code: def test_qnn_leaky_relu():
      data_dtype = "uint8"
      input_scale = 0.125
      input_zero_point = 60
      output_scale = 0.6
      output_zero_point = 17
      alpha = 0.9
  
      x = relay.var("x", shape=(1, 4), dtype=data_dtype)
      y = relay.qnn.leaky_relu(
          x=x,
          alpha=alpha,
          input_scale=relay.const(input_scale, "float32"),
          input_zero_point=relay.const(input_zero_point, "int32"),
          output_scale=relay.const(output_scale, "float32"),
          output_zero_point=relay.const(output_zero_point, "int32"),
      )
  
      func = relay.Function([x], y)
      mod = tvm.IRModule.from_expr(func)
      mod = relay.transform.InferType()(mod)
      mod = relay.qnn.transform.CanonicalizeOps()(mod)
      func = mod["main"]
  
      x_data = np.array((255, 133, 0, 9)).reshape((1, 4))
      x_dequantized = dequantize(x_data, input_scale, input_zero_point)
      golden_output = generate_golden_output(
          x_data,
          x_dequantized,
          alpha,
          output_scale,
          output_zero_point,
          input_zero_point,
      )
  
      op_res = relay.create_executor(
          "graph", device=tvm.cpu(0), target="llvm"
      ).evaluate(func)(x_data)
  
      np.testing.assert_equal(op_res.numpy(), golden_output)
  
imports: import tvm
  import numpy
  from tvm import relay
label_desc: Use image node_id 3 for calling a global function with example usage: test_qnn_leaky_relu() without return types