code: def _make_matrices(
      broadcast, ifm_layout, ifm2_layout, ofm_layout, ofm_channels
  ):
      broadcast_h, broadcast_w, broadcast_c = broadcast
      nhwc_to_nhcwb16, nhcwb16_to_nhwc = get_layout_transform_matrices(
          ofm_channels
      )
      ifm_matrix = [
          [1, 0, 0, 0, 0],
          [0, 1, 0, 0, 0],
          [0, 0, 1, 0, 0],
          [0, 0, 0, 1, 0],
          [0, 0, 0, 0, 1],
      ]
      ifm2_matrix = [
          [1, 0, 0, 0, 0],
          [0, (1 - broadcast_h), 0, 0, broadcast_h],
          [0, 0, (1 - broadcast_w), 0, broadcast_w],
          [0, 0, 0, (1 - broadcast_c), broadcast_c],
          [0, 0, 0, 0, 1],
      ]
      if ofm_layout == "NHCWB16":
          ifm_matrix = np.matmul(ifm_matrix, nhcwb16_to_nhwc).tolist()
          ifm2_matrix = np.matmul(ifm2_matrix, nhcwb16_to_nhwc).tolist()
      if ifm_layout == "NHCWB16":
          ifm_matrix = np.matmul(nhwc_to_nhcwb16, ifm_matrix).tolist()
      if ifm2_layout == "NHCWB16":
          ifm2_matrix = np.matmul(nhwc_to_nhcwb16, ifm2_matrix).tolist()
  
      return (ifm_matrix, ifm2_matrix)
  
file_path: tvm/tests/python/contrib/test_ethosu/cascader/test_ethosu_binary_elementwise_matcher.py
imports: import pytest
  import numpy
  import math
  from tvm import te
  import tvm.contrib.ethosu.cascader
  from tvm.relay.backend.contrib.ethosu.te.binary_elementwise import match_ethosu_binary_elementwise, binary_elementwise_compute
  from tvm.relay.backend.contrib.ethosu.te.common import get_layout_transform_matrices
label_desc: Use image node_id 1 for calling a global function with example usage: _make_matrices(broadcast, ifm_layout, ifm2_layout, ofm_layout, ofm_channels) and returns: ifm_matrix,  ifm2_matrix