class_docstr: A helper class to build consecutive ONNX nodes.
class_docstr_tok: ["A","helper","class","to","build","consecutive","ONNX","nodes","."]
docstr: Creates a new ONNX node with output names, and returns its outputs.
  
  Args:
      op_name (str): The name of an ONNX op.
      input_names (list of str): The names of input values.
      output_names (int of str): The names of output values.
      **kwargs (dict): ONNX attributes of the node.
  
  Returns:
      A str of the output name when number of output is 1.
      A tuple of str of the output names otherwise.
docstr_tok: ["Creates","a","new","ONNX","node","with","output","names",",","and","returns","its","outputs",".","Args",":","op_name","(","str",")",":","The","name","of","an","ONNX","op",".","input_names","(","list","of","str",")",":","The","names","of","input","values",".","output_names","(","int","of","str",")",":","The","names","of","output","values",".","*","*","kwargs","(","dict",")",":","ONNX","attributes","of","the","node",".","Returns",":","A","str","of","the","output","name","when","number","of","output","is","1",".","A","tuple","of","str","of","the","output","names","otherwise","."]
code: def op_output_named(
      self, op_name, input_names, output_names, **kwargs
  ):
      """Creates a new ONNX node with output names, and returns its outputs.
  
      Args:
          op_name (str): The name of an ONNX op.
          input_names (list of str): The names of input values.
          output_names (int of str): The names of output values.
          **kwargs (dict): ONNX attributes of the node.
  
      Returns:
          A str of the output name when number of output is 1.
          A tuple of str of the output names otherwise.
      """
      # Prevent a common mistake. `input_names="input"` creates a
      # node with 5 inputs.
      assert not isinstance(input_names, str)
      node = onnx.helper.make_node(
          op_name,
          input_names,
          output_names,
          name=self.node_name(),
          **kwargs,
      )
      self._nodes.append(node)
      if len(output_names) == 1:
          return node.output[0]
      else:
          return tuple(node.output)
  
file_path: chainer/onnx_chainer/onnx_helper.py
imports: import onnx
label_desc: Use image node_id 4 for calling the GraphBuilder obj's underlying member method code with example usage: obj.op_output_named(op_name, input_names, output_names) and returns: node, tuple