code: def _rank_and_axes(pattern):
      rank = len(pattern.root_var.shape)
      axes = pattern.main_reduce.axes.val
      negative_axes = [a - rank if a >= 0 else a for a in axes]
      negative_axes.sort()
      return rank, axes, negative_axes
  
file_path: coremltools/coremltools/converters/mil/experimental/passes/generic_layernorm_instancenorm_pattern_fusion.py
imports: import os
  import numpy
  from coremltools.converters.mil import Builder
  from coremltools.converters.mil.experimental.passes.generic_pass_infrastructure import register_generic_pass
  from coremltools.converters.mil.mil import get_new_symbol
label_desc: Use image node_id 11 for calling a global function with example usage: _rank_and_axes(pattern) and returns: rank,  axes,  negative_axes