def _map_extent_to_bbox_filter(source_map):
    """Return formatted coordinates, from ipylealet format to owslib.wfs format.

    This function takes the result of ipyleaflet's Map.bounds() function and formats it
    so it can be used as a bbox filter in an owslib WFS request.

    Parameters
    ----------
    source_map: Map instance
        The map instance from which the extent will calculated

    Returns
    -------
    Tuple
        Coordinates formatted to WebFeatureService bounding box filter.
    """
    coords = source_map.bounds
    lon1 = coords[0][1]
    lat1 = coords[0][0]
    lon2 = coords[1][1]
    lat2 = coords[1][0]
    formatted_coordinates = (lon1, lat1, lon2, lat2)

    return formatted_coordinates