code: def get_subgraph_for_concept(
          self, concept: str, depth: int = 1, reverse: bool = False
      ):
          
  
          nodeset = {concept}
  
          if reverse:
              func = self.predecessors
          else:
              func = self.successors
          for i in range(depth):
              nodeset.update(
                  chain.from_iterable([list(func(n)) for n in nodeset])
              )
  
          return AnalysisGraph(self.subgraph(nodeset).copy())
docs: Returns a new subgraph of the analysis graph for a single concept.
  
          Args:
              concept: The concept that the subgraph will be centered around.
              depth: The depth to which the depth-first search must be performed.
  
              reverse: Sets the direction of causal influence flow to examine.
                  Setting this to False (default) will search for upstream causal
                  influences, and setting it to True will search for
                  downstream causal influences.
  
          Returns:
              AnalysisGraph