class_docstr: Identify the pattern that corresponds to the exact version of ``gelu``, and replace it with a single
  ``gelu`` layer with ``mode=EXACT``. The pattern is ``y = 0.5 * x * (1 + erf (x / srqt (2))``, which
  can be represented by one of the following:
  
  .. code-block::
  
      (1)
          [...] ----> div (1.414) ---> erf ---> add (1) -----> mul (0.5) ---> mul ---> [...]
            |                                                                  ^
            |                                                                  |
            |-------------------------------------------------------------------
  
      (2)
          [...] ----> div (1.414) ---> erf ---> add (1) -----> mul ---> mul (0.5) ---> [...]
            |                                                   ^
            |                                                   |
            |----------------------------------------------------
  
      (3)
          [...] ----> div (1.414) ---> erf ---> add (1) -----> mul ------> [...]
            |                                                   ^
            |                                                   |
            |---------------> mul(0.5) --------------------------
  
      All of them are converted to:
          [...] ----> gelu (mode=EXACT) ---> [...]
class_docstr_tok: ["Identify","the","pattern","that","corresponds","to","the","exact","version","of","``","gelu","``",",","and","replace","it","with","a","single","``","gelu","``","layer","with","``","mode=EXACT","``",".","The","pattern","is","``","y","=","0.5","*","x","*","(","1","+","erf","(","x","\/","srqt","(","2",")",")","``",",","which","can","be","represented","by","one","of","the","following",":","..","code-block",":",":","(","1",")","[","...","]","--","--",">","div","(","1.414",")","--","-",">","erf","--","-",">","add","(","1",")","--","--","-",">","mul","(","0.5",")","--","-",">","mul","--","-",">","[","...","]","|","^","|","|","|","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-","(","2",")","[","...","]","--","--",">","div","(","1.414",")","--","-",">","erf","--","-",">","add","(","1",")","--","--","-",">","mul","--","-",">","mul","(","0.5",")","--","-",">","[","...","]","|","^","|","|","|","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","(","3",")","[","...","]","--","--",">","div","(","1.414",")","--","-",">","erf","--","-",">","add","(","1",")","--","--","-",">","mul","--","--","--",">","[","...","]","|","^","|","|","|","--","--","--","--","--","--","--","-",">","mul","(","0.5",")","--","--","--","--","--","--","--","--","--","--","--","--","--","All","of","them","are","converted","to",":","[","...","]","--","--",">","gelu","(","mode=EXACT",")","--","-",">","[","...","]"]
code: def _fuse_gelu_exact_block(self, block):
      fusion_occurred = False
      for op in list(block.operations):
          for b in op.blocks:
              block_changed = True
              while block_changed:
                  block_changed = self._fuse_gelu_exact_block(b)
          if len(op.blocks) > 0:
              # This op can't be real_div or mul
              continue
  
          if op.op_type in ["mul", "real_div"]:
              fusion_occurred = self._try_to_transform(op, block)
              # has to break as the downstream iterator is affected.
              if fusion_occurred:
                  return fusion_occurred
      return fusion_occurred
  
imports: import numpy
  from coremltools.converters.mil.experimental.passes.generic_pass_infrastructure import fuse_all_blocks
  from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.mil import get_new_symbol
  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, _check_var_scalar_value_in_interval, block_context_manager
  from coremltools.converters.mil.mil.passes.pass_registry import register_pass
label_desc: Use image node_id 3 for calling the fuse_gelu_exact obj's underlying member method code with example usage: obj._fuse_gelu_exact_block(block) and returns: fusion_occurred, fusion_occurred