parameters: (self, graph: Graph)
return_statement: return SubgraphMatch(graph, self.replacement_desc, matched_nodes,
                               self.replacement_desc.get_inputs_description(),
                               self.replacement_desc.get_outputs_description(), '')
docstring: :param graph: networkx graph to find sub-graph in.
          :return: an object describing matched sub-graph.
docstring_summary: :param graph: networkx graph to find sub-graph in.
          :return: an object describing matched sub-graph.
docstring_tokens: : param graph : networkx graph to find sub - graph in . : return : an object describing matched sub - graph .
function: def _match_sub_graph_for_points(self, graph: Graph):
          """
          :param graph: networkx graph to find sub-graph in.
          :return: an object describing matched sub-graph.
          """
          start_points = self.replacement_desc.get_internal_input_nodes(graph)
          end_points = self.replacement_desc.get_internal_output_nodes(graph)
          # check that start and end points exist in the graph
          for node_name in start_points + end_points:
              if node_name not in graph.nodes():
                  log.info('Node "{}" does not exist in the graph. Failed to match sub-graph by points "{}".'.format(
                      node_name, self.replacement_desc.id))
                  return None
  
          matched_nodes = sub_graph_between_nodes(graph, start_points, end_points, include_control_flow=False)
          return SubgraphMatch(graph, self.replacement_desc, matched_nodes,
                               self.replacement_desc.get_inputs_description(),
                               self.replacement_desc.get_outputs_description(), '')
function_tokens: def _match_sub_graph_for_points ( self , graph : Graph ) : start_points = self . replacement_desc . get_internal_input_nodes ( graph ) end_points = self . replacement_desc . get_internal_output_nodes ( graph ) # check that start and end points exist in the graph for node_name in start_points + end_points : if node_name not in graph . nodes ( ) : log . info ( 'Node "{}" does not exist in the graph. Failed to match sub-graph by points "{}".' . format ( node_name , self . replacement_desc . id ) ) return None matched_nodes = sub_graph_between_nodes ( graph , start_points , end_points , include_control_flow = False ) return SubgraphMatch ( graph , self . replacement_desc , matched_nodes , self . replacement_desc . get_inputs_description ( ) , self . replacement_desc . get_outputs_description ( ) , '' )