class_docstr: This class is a singleton builder to construct a MIL program. For more
  information, see `Create a MIL program <https://coremltools.readme.io/docs/model-intermediate-language#create-a-mil-program>`_.
  
  Importing ``.ops`` triggers the installation of all MIL ops into the Builder.
  For details on each op, see `MIL ops <https://apple.github.io/coremltools/source/coremltools.converters.mil.mil.ops.defs.html>`_.
  
  Examples
  --------
  
  >>> from coremltools.converters.mil.mil import Builder as mb
  >>> from coremltools.converters.mil.mil import Program, Function
  
  >>> prog = Program()
  >>> func_inputs = {"x": mb.placeholder(shape=[2,3]),
  >>>                "y": mb.placeholder(shape=[2,3])}
  >>> with Function(func_inputs) as ssa_fun:
  >>>   x, y = ssa_fun.inputs['x'], ssa_fun.inputs['y']
  >>>   res_var = mb.add(x=x, y=y) # created within ssa_fun block
  >>>   ssa_fun.set_outputs([res_var])
  >>> prog.add_function("main", ssa_fun)
  
  >>> # Importing ops triggers installation of all ops into Builder.
  >>> from .ops import defs as _ops
code: def _add_const(cls, val, name, before_op):
      if not is_python_value(val):
          raise ValueError("Cannot add const {}".format(val))
      if any_symbolic(val):
          msg = (
              "Python native vals (list, tuple), np.array that are"
              + "operation inputs cannot have symbolic values. Consider feeding"
              + "symbolic shape in through placeholder and use mb.shape() "
              + "operator. Input {}: {}"
          )
          raise ValueError(msg.format(name, val))
      const_name = cls._get_free_name(name)
      logger.debug("Adding const op '{}'".format(const_name))
      output_var = cls.const(
          val=val, name=const_name, before_op=before_op
      )
      return output_var
  
imports: import numbers
  from collections import defaultdict
  from typing import Callable, List, Optional
  import numpy
  from coremltools import _logger
  from coremltools.converters.mil._deployment_compatibility import AvailableTarget
  from coremltools.converters.mil.mil.types.symbolic import any_symbolic
  from .block import Function, curr_block
  from .input_type import InternalInputType, ListOrTensorInputType, TensorInputType, TupleInputType
  from .program import Placeholder, Program
  from .var import InternalVar, Var
label_desc: Use image node_id 3 for calling the Builder obj's underlying member method code with example usage: obj._add_const(cls, val, name, before_op) and returns: output_var