def METHOD_NAME(project_id: int) -> None:
    """
    Tag a project with geoname locations.
    This function used to retrieve data from Hascore, which has been merged into Funnel
    and is available directly as the GeoName model. This code continues to operate with
    the legacy Hascore data structure, and is pending rewrite.
    """
    project = Project.query.get(project_id)
    if not project.location:
        return
    results = GeoName.parse_locations(
        project.location, special=["Internet", "Online"], bias=['IN', 'US']
    )
    geonames = defaultdict(dict)
    tokens = []
    for item in results:
        if 'geoname' in item:
            geoname = item['geoname'].as_dict(alternate_titles=False)
            geonames[geoname['geonameid']]['geonameid'] = geoname['geonameid']
            geonames[geoname['geonameid']]['primary'] = geonames[
                geoname['geonameid']
            ].get('primary', True)
            for gtype, related in geoname.get('related', {}).items():
                if gtype in ['admin2', 'admin1', 'country', 'continent']:
                    geonames[related['geonameid']]['geonameid'] = related['geonameid']
                    geonames[related['geonameid']]['primary'] = False
            tokens.append(
                {
                    'token': item.get('token', ''),
                    'geoname': {
                        'name': geoname['name'],
                        'geonameid': geoname['geonameid'],
                    },
                }
            )
        else:
            tokens.append({'token': item.get('token', '')})
    project.parsed_location = {'tokens': tokens}
    for locdata in geonames.values():
        loc = ProjectLocation.query.get((project_id, locdata['geonameid']))
        if loc is None:
            loc = ProjectLocation(project=project, geonameid=locdata['geonameid'])
            db.session.add(loc)
            db.session.flush()
        loc.primary = locdata['primary']
    for location in project.locations:
        if location.geonameid not in geonames:
            db.session.delete(location)
    db.session.commit()