def find_tile(polygon, tile_lookup):
    '\n\n    Parameters\n    ----------\n    polygon : tuple\n        The bounds of the modeling region.\n    tile_lookup : dict\n        A lookup table containing raster tile boundary coordinates\n        as the keys, and the file paths as the values.\n\n    Return\n    ------\n    output : list\n        Contains the file path to the correct raster tile. Note:\n        only the first element is returned and if there are more than\n        one paths, an error is returned.\n\n    '
    output = []
    poly_bbox = box(polygon[0], polygon[1], polygon[2], polygon[3])
    for (key, value) in tile_lookup.items():
        bbox = box(key[0], key[1], key[2], key[3])
        if bbox.intersects(poly_bbox):
            output.append(value)
    if (len(output) == 1):
        return output[0]
    elif (len(output) > 1):
        print('Problem with find_tile returning more than 1 path')
        return output[0]
    else:
        print('Problem with find_tile: Unable to find raster path')
Parameters
----------
polygon : tuple
    The bounds of the modeling region.
tile_lookup : dict
    A lookup table containing raster tile boundary coordinates
    as the keys, and the file paths as the values.

Return
------
output : list
    Contains the file path to the correct raster tile. Note:
    only the first element is returned and if there are more than
    one paths, an error is returned.
def find_tile(polygon, tile_lookup):
    '\n\n    Parameters\n    ----------\n    polygon : tuple\n        The bounds of the modeling region.\n    tile_lookup : dict\n        A lookup table containing raster tile boundary coordinates\n        as the keys, and the file paths as the values.\n\n    Return\n    ------\n    output : list\n        Contains the file path to the correct raster tile. Note:\n        only the first element is returned and if there are more than\n        one paths, an error is returned.\n\n    '
    output = []
    poly_bbox = box(polygon[0], polygon[1], polygon[2], polygon[3])
    for (key, value) in tile_lookup.items():
        bbox = box(key[0], key[1], key[2], key[3])
        if bbox.intersects(poly_bbox):
            output.append(value)
    if (len(output) == 1):
        return output[0]
    elif (len(output) > 1):
        print('Problem with find_tile returning more than 1 path')
        return output[0]
    else:
        print('Problem with find_tile: Unable to find raster path')