def coord_to_tuple(coordinates):
    """Transform coordinates to a 2 tuple."""
    if type(coordinates) == str:
        center = tuple(map(float, coordinates.split(',')))

    elif type(coordinates) == dict:
        center = tuple(coordinates.values())

    elif type(coordinates) == tuple:
        center = coordinates

    elif (type(coordinates) == list) and (len(coordinates) == 2):
        center = tuple(coordinates)

    else:
        print('invalid coordinate type')
        center = None

    return center