code: def CreatePrimFuncWithoutConstants(const_dict):
      """
      This pass will remove arguments that are constants
      from PrimFunc Args. These should be replaced properly
      with tir.allocate_const when it becomes available.
  
      It also modifies the constant dictionary to
      rewrite the keys as the actual tir.Vars that are params
      rather than the index because this pass removes PrimFunc
      arguments that represent constants.
      """
  
      new_const_dict = dict()
  
      def _ftransform(f, mod, ctx):
          new_params = list()
          new_buffer_map = dict()
          for param_idx in const_dict.keys():
              # We are using buffer_var to key the constants as
              # PrimFunc params of constants will be removed.
              new_const_dict[
                  f.buffer_map[f.params[param_idx]].data
              ] = const_dict[param_idx]
          for i, param in enumerate(f.params):
              if i not in const_dict.keys():
                  new_params.append(param)
                  new_buffer_map[param] = f.buffer_map[param]
          return tvm.tir.PrimFunc(
              new_params,
              f.body,
              f.ret_type,
              new_buffer_map,
              f.attrs,
              f.span,
          )
  
      def _create_primfunc_without_constants(mod):
          transform_func = tvm.tir.transform.prim_func_pass(
              _ftransform,
              opt_level=0,
              name="tir.contrib.ethos-u.CreatePrimFuncWithoutConstants",
          )
          mod = transform_func(mod)
          return mod, new_const_dict
  
      return _create_primfunc_without_constants
  
imports: from collections import namedtuple
  from typing import Optional
  import numpy
  from ethosu.vela import api
  import tvm
  from tvm.relay.backend.contrib.ethosu import vela_api
  from tvm.relay.backend.contrib.ethosu import tir_to_cs_translator
  from .convolution import get_conv2d_params
  from .depthwise import get_depthwise_conv2d_params
  from .pooling import get_pooling_params
  from .binary_elementwise import get_binary_elementwise_params
  from .identity import get_identity_params
  from .unary_elementwise import get_unary_elementwise_params
  from .transform import get_copy_params
  from .producers_consumers import ProducersConsumers
  from ..None import _ffi_api
label_desc: Use image node_id 7 for calling a global function with example usage: CreatePrimFuncWithoutConstants(const_dict) and returns: _create_primfunc_without_constants, tvm, mod,  new_const_dict