class_docstr: Detect the pattern ``reshape_1-->transpose-->reshape_2``, where ``reshape_1`` has
  an output tensor with ``rank >= 6``, and ``reshape_2`` produces a tensor with ``rank <= 5``.
  
  In general, we can expand this pattern into a sequence of rank 4 ``reshape`` and ``transpose`` ops,
  which is supported by the Core ML runtime.
  
  .. code-block::
  
      Given:
          %1 = reshape(%x, shape=(d1, d2, d3, d4, ..., dn))
          %2 = transpose(%1, perm=(p1, p2, ..., pn))
          %3 = reshape(%2, shape=(o1, o2, o3, o4, o5))
  
      Result:
          %t1 = reshape(%x, shape=(y11, y12, y13, y14))
          %h1 = transpose(%t1, perm=[0, 2, 1, 3])
          %t2 = reshape(%h1, shape=(y21, y22, y23, 214))
          %h2 = transpose(%t2, perm=[0, 2, 1, 3])
          ....
          %hn = transpose(%tn, perm=[0, 2, 1, 3])
          %3 = reshape(%hn, shape=(o1, o2, o3, o4, o5))
class_docstr_tok: ["Detect","the","pattern","``","reshape_1","--",">","transpose","--",">","reshape_2","``",",","where","``","reshape_1","``","has","an","output","tensor","with","``","rank",">","=","6","``",",","and","``","reshape_2","``","produces","a","tensor","with","``","rank","<","=","5","``",".","In","general",",","we","can","expand","this","pattern","into","a","sequence","of","rank","4","``","reshape","``","and","``","transpose","``","ops",",","which","is","supported","by","the","Core","ML","runtime",".","..","code-block",":",":","Given",":","%","1","=","reshape","(","%","x",",","shape=","(","d1",",","d2",",","d3",",","d4",",","...",",","dn",")",")","%","2","=","transpose","(","%","1",",","perm=","(","p1",",","p2",",","...",",","pn",")",")","%","3","=","reshape","(","%","2",",","shape=","(","o1",",","o2",",","o3",",","o4",",","o5",")",")","Result",":","%","t1","=","reshape","(","%","x",",","shape=","(","y11",",","y12",",","y13",",","y14",")",")","%","h1","=","transpose","(","%","t1",",","perm=","[","0",",","2",",","1",",","3","]",")","%","t2","=","reshape","(","%","h1",",","shape=","(","y21",",","y22",",","y23",",","214",")",")","%","h2","=","transpose","(","%","t2",",","perm=","[","0",",","2",",","1",",","3","]",")","....","%","hn","=","transpose","(","%","tn",",","perm=","[","0",",","2",",","1",",","3","]",")","%","3","=","reshape","(","%","hn",",","shape=","(","o1",",","o2",",","o3",",","o4",",","o5",")",")"]
code: def expand_high_rank_reshape_and_transpose_block(self, block):
      fusion_status = False
      for op in list(block.operations):
          for b in op.blocks:
              block_changed = True
              while block_changed:
                  block_changed = (
                      self.expand_high_rank_reshape_and_transpose_block(
                          b
                      )
                  )
          if len(op.blocks) > 0:
              continue
  
          ops = self._match_pattern(op)
          if ops is not None:
              fusion_status = self._try_to_transform(ops, block)
              # has to break as the downstream iterator is affected.
              if fusion_status:
                  return fusion_status
      return fusion_status
  
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 4 for calling the expand_high_rank_reshape_and_transpose obj's underlying member method code with example usage: obj.expand_high_rank_reshape_and_transpose_block(block) and returns: fusion_status, fusion_status