class_docstr: Detect if ``onehot (axis=-1, on_value=1, off_value=0)`` is followed by a ``matmul`` op (no bias).
  If so, they can be replaced by a ``gather`` op.
  
  .. code-block::
  
      Input:
          %2 = one_hot(%1, on_value=1, off_value=0, axis=-1)
          %3 = const() # rank 2
          %4  = matmul(%2, %3)
  
      Output:
          %4 = gather(%3, %2, axis=0)
class_docstr_tok: ["Detect","if","``","onehot","(","axis=-1",",","on_value=1",",","off_value=0",")","``","is","followed","by","a","``","matmul","``","op","(","no","bias",")",".","If","so",",","they","can","be","replaced","by","a","``","gather","``","op",".","..","code-block",":",":","Input",":","%","2","=","one_hot","(","%","1",",","on_value=1",",","off_value=0",",","axis=-1",")","%","3","=","const","(",")","#","rank","2","%","4","=","matmul","(","%","2",",","%","3",")","Output",":","%","4","=","gather","(","%","3",",","%","2",",","axis=0",")"]
code: def apply(self, prog):
      for f in prog.functions.values():
          block_changed = True
          while block_changed:
              block_changed = self._fuse_onehot_matmul_to_gather_block(
                  f
              )
  
imports: import numpy
  from coremltools.converters.mil._deployment_compatibility import AvailableTarget
  from coremltools.converters.mil.frontend._utils import value_at
  from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.mil.block import is_current_opset_version_compatible_with
  from coremltools.converters.mil.mil.passes.graph_pass import AbstractGraphPass
  from coremltools.converters.mil.mil.passes.helper import _check_child_op_type, _check_var_scalar_value, block_context_manager
  from coremltools.converters.mil.mil.passes.pass_registry import register_pass
  from coremltools.converters.mil.mil.types.symbolic import any_symbolic
label_desc: Use image node_id 1 for calling the fuse_onehot_matmul_to_gather obj's underlying member method code with example usage: obj.apply(prog) without return types