code: def get_conv2d_args(
      call, include_buffers=False, remove_constants=False
  ):
      """A method to extract the arguments from conv2d extern call."""
      args = call.args
      conv_args = []
      remove_indices = [0]
  
      # call.args[41]: BufferLoad for the first half of the weights
      # call.args[42]: length of the load of the first half of the weights
      # call.args[43]: BufferLoad for the second half of the weights
      # call.args[44]: length of the load of the second half of the weights
      # call.args[46]: BufferLoad for the first half of the bias
      # call.args[47]: length of the load of the first half of the bias
      # call.args[48]: BufferLoad for the second half of the bias
      # call.args[49]: length of the load of the second half of the bias
      if remove_constants:
          remove_indices += [41, 42, 43, 44, 46, 47, 48, 49]
  
      for i, arg in enumerate(args):
          if i in remove_indices:
              continue
          elif isinstance(arg, tvm.tir.expr.IntImm) or isinstance(
              arg, tvm.tir.expr.FloatImm
          ):
              conv_args.append(arg.value)
          elif (
              isinstance(arg, tvm.tir.expr.BufferLoad)
              and not include_buffers
          ):
              conv_args.append(arg.indices[0])
          else:
              conv_args.append(arg)
  
      return conv_args
  
imports: import pytest
  import tvm
  from tvm import relay
  from tvm.relay.backend.contrib.ethosu.tir.compiler import _lower_to_tir
  from tvm.relay.backend.contrib.ethosu.tir.scheduler import total_cascader
  from tvm.relay.testing import run_opt_pass
  from tvm.script import tir
  from .infra import make_ethosu_conv2d
label_desc: Use image node_id 2 for calling a global function with example usage: get_conv2d_args(call, include_buffers, remove_constants) and returns: conv_args