def METHOD_NAME(g, edge_filter_func):
    """Get a subgraph of original graph filtered by a provided function."""
    logger.info('Getting subgraph with %s function' % edge_filter_func)
    view = nx.subgraph_view(
        g, filter_edge=functools.partial(edge_filter_func, g))
    # Copying to get a graph object instead of view
    new_g = view.copy()
    return new_g