class_docstr: Context of converter
  
  This context shares names during exporting.
  
  Attributes:
      name_list (dict): list of being exported as ONNX node name with pinned
          or not, keyed by instance ID. When the target variable is
          ``chainer.Variable`` or ``chainer.Parameter``, instance ID of
          ``ndarray`` held by the variable is also put as key, because some
          functions like ``F.where`` internally unwrap variable.
class_docstr_tok: ["Context","of","converter","This","context","shares","names","during","exporting",".","Attributes",":","name_list","(","dict",")",":","list","of","being","exported","as","ONNX","node","name","with","pinned","or","not",",","keyed","by","instance","ID",".","When","the","target","variable","is","``","chainer.Variable","``","or","``","chainer.Parameter","``",",","instance","ID","of","``","ndarray","``","held","by","the","variable","is","also","put","as","key",",","because","some","functions","like","``","F.where","``","internally","unwrap","variable","."]
docstr: Add a constant array as an ONNX Constant node.
  
  Returns:
      str: registered name.
docstr_tok: ["Add","a","constant","array","as","an","ONNX","Constant","node",".","Returns",":","str",":","registered","name","."]
code: def add_const(self, array, name):
      """Add a constant array as an ONNX Constant node.
  
      Returns:
          str: registered name.
      """
      assert "/" not in name
      onnx_name = "{}_const_{}".format(
          onnx_helper.get_func_name(), name
      )
      self.set_name(array, onnx_name)
      tensor = _tensor_from_array_for_constant(array, name=onnx_name)
      const_node = onnx_helper.make_node(
          "Constant", [], [onnx_name], value=tensor
      )
      self.constants.append(const_node)
      return onnx_name
  
file_path: chainer/onnx_chainer/context.py
imports: import chainer
  import onnx
  from onnx import numpy_helper
  from onnx_chainer import onnx_helper
label_desc: Use image node_id 6 for calling the Context obj's underlying member method code with example usage: obj.add_const(array, name) and returns: onnx_name