code: def get_subnetwork(statements, nodes, relevance_network=None,
                     relevance_node_lim=10):
      
      if relevance_network is not None:
          relevant_nodes = _find_relevant_nodes(nodes, relevance_network,
                                                relevance_node_lim)
          all_nodes = nodes + relevant_nodes
      else:
          all_nodes = nodes
      filtered_statements = _filter_statements(statements, all_nodes)
      pa = PysbAssembler()
      pa.add_statements(filtered_statements)
      model = pa.make_model()
      return model
docs: Return a PySB model based on a subset of given INDRA Statements.
  
      Statements are first filtered for nodes in the given list and other nodes
      are optionally added based on relevance in a given network. The filtered
      statements are then assembled into an executable model using INDRA's
      PySB Assembler.
  
      Parameters
      ----------
      statements : list[indra.statements.Statement]
          A list of INDRA Statements to extract a subnetwork from.
      nodes : list[str]
          The names of the nodes to extract the subnetwork for.
      relevance_network : Optional[str]
          The UUID of the NDEx network in which nodes relevant to the given
          nodes are found.
      relevance_node_lim : Optional[int]
          The maximal number of additional nodes to add to the subnetwork
          based on relevance.
  
      Returns
      -------
      model : pysb.Model
          A PySB model object assembled using INDRA's PySB Assembler from
          the INDRA Statements corresponding to the subnetwork.