Legal history of Latvia