code: def change_ndarray_layout(arr, src_layout, dst_layout):
      """Makes a copy of an ndarray, reshaping it to a new data layout.
  
      Parameter
      ---------
      arr : numpy.ndarray
          The ndarray to be reformatted.
  
      src_layout : str
          The current layout of the Relay constant. Must be alphabetic (e.g. NHWC
          or OIHW, but not NCHW2c).
  
      dst_layout : str
          The desired layout of new the Relay constant. Must be alphabetic (e.g. NHWC
          or OIHW, but not NCHW2c).
  
      Returns
      -------
      dst_shape : numpy.ndarray
          A copy of the ndarray with the new layout.
      """
      assert src_layout.isalpha() and dst_layout.isalpha()
      axis_order = [src_layout.index(c) for c in dst_layout]
      return np.transpose(arr, axis_order)
  
file_path: tvm/tests/python/relay/strategy/arm_cpu/test_generalized_conv2d.py
imports: import numpy
  import tvm
  import tvm.testing
  from tvm import relay
  from tvm.testing.aot import AOTTestModel, compile_and_run, generate_ref_data
  from tvm.micro.testing.aot_test_utils import AOT_CORSTONE300_RUNNER
label_desc: Use image node_id 1 for calling a global function with example usage: change_ndarray_layout(arr, src_layout, dst_layout) and returns: np