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`.
      If an input arg name start with prefix `_`, that indicates the input has the following properties:
      1. Most of the time, the input is type of ``InternalInputType`` and
         used only in pymil scope. It doesn't have the corresponding arg / attr
         in the MIL framework definition.
      2. It won't be printed in pymil.
  
  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","`",".","If","an","input","arg","name","start","with","prefix","`","_","`",",","that","indicates","the","input","has","the","following","properties",":","1",".","Most","of","the","time",",","the","input","is","type","of","``","InternalInputType","``","and","used","only","in","pymil","scope",".","It","does","n't","have","the","corresponding","arg","\/","attr","in","the","MIL","framework","definition",".","2",".","It","wo","n't","be","printed","in","pymil",".","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"]
docstr: # Evaluation is two stage:
  #
  # Stage 1: Check whether the method value_inference() is implemented
  #
  # Stage 2: Check if there's an value_inference() implementation
  #          for given input types.
  #
  # Suppose input are all SYMBOL:
  # Case 1: No value_inference() implemented => fail at stage 1
  # Case 2: If value_inference() implemented, but requires all VALUE not
  #         SYMBOL => fail at stage 2
  # Case 3: If value_inference() implemented, and has no restriction on
  #         input types => Success
  #
  # If either stage fails, outputs[i].val is None.
  # Otherwise, output[i].sym_val is not None.
  
  output_types: tuple of builtin types
  
  Returns:
      output_vals: tuple of builtin type with value, or tuple of None
docstr_tok: ["#","Evaluation","is","two","stage",":","#","#","Stage","1",":","Check","whether","the","method","value_inference","(",")","is","implemented","#","#","Stage","2",":","Check","if","there","'s","an","value_inference","(",")","implementation","#","for","given","input","types",".","#","#","Suppose","input","are","all","SYMBOL",":","#","Case","1",":","No","value_inference","(",")","implemented","=",">","fail","at","stage","1","#","Case","2",":","If","value_inference","(",")","implemented",",","but","requires","all","VALUE","not","#","SYMBOL","=",">","fail","at","stage","2","#","Case","3",":","If","value_inference","(",")","implemented",",","and","has","no","restriction","on","#","input","types","=",">","Success","#","#","If","either","stage","fails",",","outputs","[","i","]",".val","is","None",".","#","Otherwise",",","output","[","i","]",".sym_val","is","not","None",".","output_types",":","tuple","of","builtin","types","Returns",":","output_vals",":","tuple","of","builtin","type","with","value",",","or","tuple","of","None"]
code: def _auto_val(self, output_types):
      """
      # Evaluation is two stage:
      #
      # Stage 1: Check whether the method value_inference() is implemented
      #
      # Stage 2: Check if there's an value_inference() implementation
      #          for given input types.
      #
      # Suppose input are all SYMBOL:
      # Case 1: No value_inference() implemented => fail at stage 1
      # Case 2: If value_inference() implemented, but requires all VALUE not
      #         SYMBOL => fail at stage 2
      # Case 3: If value_inference() implemented, and has no restriction on
      #         input types => Success
      #
      # If either stage fails, outputs[i].val is None.
      # Otherwise, output[i].sym_val is not None.
  
      output_types: tuple of builtin types
  
      Returns:
          output_vals: tuple of builtin type with value, or tuple of None
      """
      do_auto_val = True
  
      if do_auto_val:
          # Is self.value_inference implemented for corresponding input?
          try:
              vals = self.value_inference()
          except NotImplementedError:
              do_auto_val = False
  
      if not do_auto_val:
          # No auto_val possible.
          return tuple(None for _ in output_types)
  
      if not isinstance(vals, (tuple, list)):
          vals = (vals,)
      for val in vals:
          if val is None:
              do_auto_val = False
      if not do_auto_val:
          # No auto_val possible.
          return tuple(None for _ in output_types)
  
      auto_val = []
      for t, v in zip(output_types, vals):
          builtin_val = t()
          if isinstance(v, mil_list):
              builtin_val.val = v.ls
          else:
              builtin_val.val = v
          auto_val.append(builtin_val)
      return auto_val
  
imports: from typing import Any, Dict, Tuple
  import numpy
  from coremltools.converters.mil.mil import types
  from coremltools.converters.mil.mil.types import is_compatible_type
  from coremltools.converters.mil.mil.types.symbolic import any_symbolic, is_symbolic
  from .None import SPACES
  from .input_type import DefaultInputs, TensorInputType, TupleInputType
  from .var import ComplexVar, InternalVar, ListVar, Var
label_desc: Use image node_id 6 for calling the Operation obj's underlying member method code with example usage: obj._auto_val(output_types) and returns: auto_val, tuple, tuple