<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_subgraph_by_second_neighbors(graph, nodes: Iterable[BaseEntity], filter_pathologies: bool = False):
 """Get a graph around the neighborhoods of the given nodes and expand to the neighborhood of those nodes. Returns none if none of the nodes are in the graph. :param pybel.BELGraph graph: A BEL graph :param nodes: An iterable of BEL nodes :param filter_pathologies: Should expansion take place around pathologies? :return: A BEL graph induced around the neighborhoods of the given nodes :rtype: Optional[pybel.BELGraph] """

    result = get_subgraph_by_neighborhood(graph, nodes)

    if result is None:
        return

    expand_all_node_neighborhoods(graph, result, filter_pathologies=filter_pathologies)
    return result