@classmethod
    def parse_degrees(cls, degrees, arcminutes, arcseconds, direction=None):
        negative = degrees < 0 or degrees.startswith('-')
        degrees = float(degrees or 0)
        arcminutes = float(arcminutes or 0)
        arcseconds = float(arcseconds or 0)
        
        if arcminutes or arcseconds:
            more = units.degrees(arcminutes=arcminutes, arcseconds=arcseconds)
            if negative:
                degrees -= more
            else:
                degrees += more
        
        if direction in [None, 'N', 'E']:
            return degrees
        elif direction in ['S', 'W']:
            return -degrees
        else:
            raise ValueError("Invalid direction! Should be one of [NSEW].")
dataset/ETHPy150Open dgraziotin/dycapo/geopy/point.py/Point.parse_degrees/original