<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def parse_latitude(latitude, hemisphere):
 """Parse a NMEA-formatted latitude pair. Args: latitude (str):
 Latitude in DDMM.MMMM hemisphere (str):
 North or South Returns: float: Decimal representation of latitude """

    latitude = int(latitude[:2]) + float(latitude[2:]) / 60
    if hemisphere == 'S':
        latitude = -latitude
    elif not hemisphere == 'N':
        raise ValueError('Incorrect North/South value %r' % hemisphere)
    return latitude