class_docstr: Represents Operation in MIL.
  
  # Properties
  name (str):
      The name of the operation
  
  input_types (InputSpec, class attr):
      Read-only named input types from all subclasses. Input types are used
      to validate `inputs`.
  
  inputs [_input_vars] (dict of str --> Var):
      An Operation (subclass of Operation) only has access to input Var,
      which is already validated against `input_spec`.
  
  outputs [_output_vars] (list of Var):
      List of output var based on type inference. Read-only
class_docstr_tok: ["Represents","Operation","in","MIL",".","#","Properties","name","(","str",")",":","The","name","of","the","operation","input_types","(","InputSpec",",","class","attr",")",":","Read-only","named","input","types","from","all","subclasses",".","Input","types","are","used","to","validate","`","inputs","`",".","inputs","[","_input_vars","]","(","dict","of","str","--",">","Var",")",":","An","Operation","(","subclass","of","Operation",")","only","has","access","to","input","Var",",","which","is","already","validated","against","`","input_spec","`",".","outputs","[","_output_vars","]","(","list","of","Var",")",":","List","of","output","var","based","on","type","inference",".","Read-only"]
code: def _validate_and_set_inputs(self, **kwargs):
      non_attributes = [
          "name",
          "symbolic_datatype",
          "datatype",
          "symbolic_value",
          "value",
          "version",
          "before_op",
          "no_check_var_visibility",  # no_check_var_visibility==True to deviate from SSA
          "no_check_var_types",  # no_check_var_types==True to force set inputs, even if type does not match with earlier ones
      ]
      op_inputs = list(self._input_types.keys())
      legal_args = op_inputs + non_attributes
      no_check_var_visibility = kwargs.get(
          "no_check_var_visibility", False
      )
      no_check_var_types = kwargs.get("no_check_var_types", False)
  
      for key in kwargs.keys():
          if key not in legal_args:
              raise RuntimeError(
                  "Unknown input '{}' for op '{}'".format(
                      key, self.op_type
                  )
              )
  
      def check_and_detach(v_new, v_old, op, no_check_var_types):
          # Check new var's sym_type is compatible with the
          # existing's sym_type.
          if (
              not _check_is_compatible_type(
                  v_new.sym_type, v_old.sym_type
              )
              and not no_check_var_types
          ):
              msg = (
                  "New var type {} not a subtype of "
                  + "existing var type {}"
              )
              raise ValueError(
                  msg.format(v_new.sym_type, v_old.sym_type)
              )
          v_old.remove_child_op(op, no_check_var_types)
  
      parsed_inputs = self.input_spec.parse_inputs(kwargs)
      for name, var in parsed_inputs:
          setattr(self, name, var)
          if var is not None and not isinstance(var, InternalVar):
              # Remove this operation itself from existing input Var's child_ops
              existing_input_var = self._input_vars.get(name, None)
              if existing_input_var is not None:
                  if isinstance(existing_input_var, (list, tuple)):
                      for v_old, v_new in zip(existing_input_var, var):
                          check_and_detach(
                              v_new, v_old, self, no_check_var_types
                          )
                  else:
                      check_and_detach(
                          var,
                          existing_input_var,
                          self,
                          no_check_var_types,
                      )
  
              # Set var as input_var
              if isinstance(var, Var):
                  var.add_child_op(self)
              elif isinstance(var, (tuple, list)):
                  for v in var:
                      v.add_child_op(self)
              # ignore function inputs
              self._input_vars[name] = var
  
imports: import logging
  import numpy
  import six
  from coremltools.converters.mil.mil import types
  from coremltools.converters.mil.mil.types.symbolic import is_symbolic, any_symbolic
  from .None import SPACES
  from .block import curr_block, _check_is_compatible_type
  from .input_type import TupleInputType
  from .var import Var, InternalVar, ListVar
label_desc: Use image node_id 10 for calling the Operation obj's underlying member method code with example usage: obj._validate_and_set_inputs() without return types