code: def get_dim_value(layout: str, dim: int):
      """This is a helper function to retrieve the value
      of the dimension given the shape and the layout
      """
      assert isinstance(layout, str)
      assert dim in list(layout)
      for idx, dim_char in enumerate(layout):
          if dim_char == dim:
              return idx
      return None
  
imports: from inspect import signature
  from enum import Enum
  from typing import Union, Tuple, List
  import numpy
  import tvm
  from tvm import relay
  from tvm._ffi import register_object
  from tvm.runtime import Object
  from .None import _ffi_api
label_desc: Use image node_id 12 for calling a global function with example usage: get_dim_value(layout, dim) and returns: None, idx