def reverse_latitude_longitude(rd_multipolygon):
if len(rd_multipolygon) == 2 and tuple(map(type, rd_multipolygon)) == (float, float):
return rd_multipolygon[::-1]
return [
reverse_latitude_longitude(element)
for element in rd_multipolygon
]