<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def location_filter(files_with_tags, location, radius):
    '''
    Get photos taken within the specified radius from a given point.
    '''
    on_location = dict()
    for f, tags in files_with_tags.items():
        if 'GPS GPSLatitude' in tags:
            try:
                lat = convert_to_decimal(str(tags['GPS GPSLatitude']))
                long = convert_to_decimal(str(tags['GPS GPSLongitude']))
            except ValueError:
                print('{0} has invalid gps info'.format(f))
            try:
                if haversine(lat, long, location['lat'], location['long']) < radius:
                    on_location[f] = tags
            except InvalidCoordinate:
                print('{0} has invalid gps info'.format(f))
    return on_location