parameters: (self)
return_statement: return graph
docstring: Expand the operator to a graph.
  
          `GraphKernelUnsupportedException` would be raised if check failed.
docstring_summary: Expand the operator to a graph.
docstring_tokens: Expand the operator to a graph .
function: def run(self):
          """
          Expand the operator to a graph.
  
          `GraphKernelUnsupportedException` would be raised if check failed.
          """
          self._check()
          graph_builder = builder.GraphBuilder()
          with graph_builder.graph_scope(self.name) as graph_scope:
              # transform input_desc to Tensor
              self.inputs = [graph_builder.tensor(inp['shape'], inp['data_type'], inp['format']) for inp in self.inputs]
              graph_scope.set_input(*self.inputs)
              outputs = self._expand(graph_builder)
              if isinstance(outputs, (list, tuple)):
                  self._check_output_same(outputs)
                  graph_scope.set_output(*outputs)
              else:
                  self._check_output_same([outputs])
                  graph_scope.set_output(outputs)
  
          graph = graph_builder.get()[0]
          graph.set_processor(self.processor)
          return graph
function_tokens: def run ( self ) : self . _check ( ) graph_builder = builder . GraphBuilder ( ) with graph_builder . graph_scope ( self . name ) as graph_scope : # transform input_desc to Tensor self . inputs = [ graph_builder . tensor ( inp [ 'shape' ] , inp [ 'data_type' ] , inp [ 'format' ] ) for inp in self . inputs ] graph_scope . set_input ( * self . inputs ) outputs = self . _expand ( graph_builder ) if isinstance ( outputs , ( list , tuple ) ) : self . _check_output_same ( outputs ) graph_scope . set_output ( * outputs ) else : self . _check_output_same ( [ outputs ] ) graph_scope . set_output ( outputs ) graph = graph_builder . get ( ) [ 0 ] graph . set_processor ( self . processor ) return graph