class_docstr: Singleton builder.
  
  Example:
  
  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['x']
    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)
docstr: Add an op of type `op_cls` (e.g., convolution) to current block.
docstr_tok: ["Add","an","op","of","type","`","op_cls","`","(","e.g.",",","convolution",")","to","current","block","."]
code: def _add_op(cls, op_cls, **kwargs):
      """
      Add an op of type `op_cls` (e.g., convolution) to current block.
      """
      kwargs = cls._maybe_set_name(kwargs, op_cls.__name__)
      logging.info(
          "Adding op '{}' of type {}".format(
              kwargs["name"], op_cls.__name__
          )
      )
      before_op = kwargs.get("before_op", None)
      kwargs = {k: v for k, v in kwargs.items() if v is not None}
      kwargs = cls._create_input_vars(
          op_cls.input_spec, kwargs["name"], op_cls, before_op, kwargs
      )
      new_op = op_cls(**kwargs)
      curr_block()._insert_op_before(new_op, before_op=before_op)
      new_op.build_nested_blocks()
      new_op.type_value_inference()
      if len(new_op.outputs) == 1:
          return new_op.outputs[0]
      return new_op.outputs
  
imports: from collections import defaultdict
  import copy
  import logging
  import six
  import numbers
  import numpy
  from coremltools.converters.mil.mil.types.symbolic import any_symbolic
  from .None import curr_block, Program, Function, Placeholder, is_internal_input
  from .input_type import _InputType, InternalStringInputType, InternalScalarOrTensorInputType, ScalarOrTensorInputType, TupleInputType, InputSpec, InternalInputType, PyFunctionInputType
  from .var import InternalVar, Var
  from .ops import defs
label_desc: Use image node_id 5 for calling the Builder obj's underlying member method code with example usage: obj._add_op(cls, op_cls) and returns: new_op, new_op