def search_wheelmap (lat, lng, interval, name, n):
    """Searches for a place which matches the given name in the 
    given coordinates range. Returns false if nothing found"""
    
    # Calculate the bbox for the API call
    from_lat = lat - interval
    to_lat = lat + interval
    from_lng = lng - interval
    to_lng = lng + interval
    
    # Remove parentheses (better for search, generally)
    name = re.sub(r'\([^)]*\)', '', name)
    
    wheelmap_client = wheelmap.Wheelmap(env['WHEELMAP_API_KEY'])
    
    bbox= (from_lng, from_lat, to_lng, to_lat)
    
    nodes = wheelmap_client.nodes_collection(bbox=bbox, per_page=n)    
    
    # max_node and max_name_match are holding the
    # best match through the SequenceMatcher after the loop    
    max_name_match = 0.0
    
    for node in nodes:
        if node.name and name:
            name_match = SequenceMatcher(None, node.name, name).ratio()
            if name_match > max_name_match:
                max_node = node
                max_name_match = name_match
                
    # Is the best match better than 60% ?
    # If yes, let's take it. Otherwise nothing was found.
    if max_name_match > 0.6:
        return max_node
    else:
        return False
dataset/ETHPy150Open finnp/squarewheel/squarewheel.py/search_wheelmap/original