code: def _lower_to_tir(func, cascader=None):
      """Lower a Relay function to TIR for the Arm(R) Ethos(TM)-U NPU target.
  
      The Relay function should only contain operations supported
      by the NPU.
  
      Parameters
      ----------
      func : tvm.relay.Function
          The Relay function to lower.
      cascader : Callable
          An optional cascading function,
  
      Returns
      -------
      mod : tvm.IRModule
          The lowered TIR module.
      consts : dict of int to numpy.ndarray
          A dict of the extracted constants keyed by their param index.
  
      """
      func, consts = extract_constants(func)
      mod = tvm.IRModule.from_expr(func)
      func = relay.transform.InferType()(mod)["main"]
      cached_func = lower_to_te(func)
      s = schedule(cached_func, consts, cascader)
      mod, consts = lower_ethosu(s, cached_func, consts)
      return mod, consts
  
imports: import tvm
  from tvm import relay
  from tvm.driver.build_module import schedule_to_module
  from tvm.relay.backend.contrib.ethosu import vela_api
  from tvm.relay.expr_functor import ExprMutator
  from ..None import util
  from .None import passes
  from .scheduler import schedule
label_desc: Use image node_id 4 for calling a global function with example usage: _lower_to_tir(func, cascader) and returns: mod,  consts