code: def test_ethosu_rescale_mul_binary_elemwise(
      ifm_shape, ifm2_shape, scale, shift, accel_type, dtype
  ):
      np.random.seed(0)
  
      def create_model():
          ifm = relay.var("ifm", shape=ifm_shape, dtype=dtype)
          ifm2 = relay.var("ifm2", shape=ifm2_shape, dtype=dtype)
          rescale_mul_op = infra.make_ethosu_binary_elementwise(
              ifm,
              ifm2,
              ifm_shape[3],
              ifm2_shape[3],
              "MUL",
              dtype,
              use_rescale=True,
              rescale_scale=scale,
              rescale_shift=shift,
          )
          return tvm.IRModule.from_expr(
              relay.Function([ifm, ifm2], rescale_mul_op)
          )
  
      def generate_output_data(input_data):
          lhs = input_data["ifm"]
          rhs = input_data["ifm2"]
          rhs = np.broadcast_to(rhs, ifm_shape)
  
          def rounding_right_shift(lhs, shift):
              r = 1 << (shift - 1)
              return (lhs + r) >> shift
  
          def apply_scale(lhs, scale):
              if dtype == "int32":
                  # For 32-bit operations scale is not applied but shift is
                  return lhs
              else:
                  return lhs * scale
  
          return [
              rounding_right_shift(
                  apply_scale(
                      np.multiply(
                          lhs.astype("int32"), rhs.astype("int32")
                      ),
                      scale,
                  ),
                  shift,
              ).astype(dtype)
          ]
  
      cpu_mod = create_model()
  
      # Generate reference data
      lhs = np.random.randint(
          low=-10, high=15, size=ifm_shape, dtype=dtype
      )
      rhs = np.random.randint(
          low=1, high=5, size=ifm2_shape, dtype=dtype
      )
      input_data = {
          "ifm": lhs,
          "ifm2": rhs,
      }
      output_data = {"output": generate_output_data(input_data)[0]}
      ethosu_mod = infra.create_ethosu_partition(cpu_mod)
  
      infra.compare_ethosu_with_reference(
          ethosu_mod, input_data, output_data, accel_type
      )
  
imports: import pytest
  import numpy
  import tflite.Model
  import tvm
  import tensorflow
  from tvm import relay
  from tvm.relay.backend.contrib.ethosu import util
  from tvm.relay.op.contrib.ethosu import partition_for_ethosu
  from tvm.testing.aot import generate_ref_data
  from .None import infra
label_desc: Use image node_id 22 for calling a global function with example usage: test_ethosu_rescale_mul_binary_elemwise(ifm_shape, ifm2_shape, scale, shift, accel_type, dtype) and returns: tvm, list, unknown, lhs, unknown