code: def lower_call(call, inputs, target, otype=None):
      """Lower the call expression to op implementation and tensor outputs."""
      assert isinstance(call.op, tvm.ir.Op)
      op = call.op
  
      if otype is not None:
          ret_type = otype
      else:
          # Prepare the call_node->checked_type(). For the call node inputs, we ensure that
          # the shape is Int32. Following code ensures the same for the output as well.
          # TODO(@icemelon9): Support recursive tuple
          ret_type = call.checked_type
          if isinstance(ret_type, _ty.TensorType):
              ret_type = _ty.TensorType(
                  get_shape(ret_type.shape), ret_type.dtype
              )
          elif isinstance(ret_type, _ty.TupleType):
              new_fields = []
              for field in ret_type.fields:
                  if isinstance(field, _ty.TensorType):
                      new_fields.append(
                          _ty.TensorType(
                              get_shape(field.shape), field.dtype
                          )
                      )
                  else:
                      new_fields.append(field)
              ret_type = _ty.TupleType(new_fields)
  
      is_dyn = _ty.is_dynamic(call.checked_type)
      for arg in call.args:
          is_dyn = is_dyn or _ty.is_dynamic(arg.checked_type)
  
      # check if in the AutoTVM tracing mode, and disable if op is not in wanted list
      env = autotvm.task.TaskExtractEnv.current
      reenable_tracing = False
      if env is not None and env.tracing:
          if (
              env.wanted_relay_ops is not None
              and op not in env.wanted_relay_ops
          ):
              env.tracing = False
              reenable_tracing = True
  
      if not is_dyn:
          best_impl, outputs = select_implementation(
              op, call.attrs, inputs, ret_type, target
          )
      else:
          # TODO(@icemelon9): Allow tvm to generate multiple kernels for dynamic shapes.
          best_impl, outputs = select_implementation(
              op,
              call.attrs,
              inputs,
              ret_type,
              target,
              use_autotvm=False,
          )
  
      # re-enable AutoTVM tracing
      if reenable_tracing:
          env.tracing = True
      return LoweredOutput(outputs, best_impl)
  
imports: from __future__ import absolute_import
  import logging
  import numpy
  import tvm
  from tvm import autotvm, te
  from tvm.auto_scheduler import is_auto_scheduler_enabled
  from tvm.meta_schedule import is_meta_schedule_enabled
  from tvm.runtime import Object
  from tvm.support import libinfo
  from tvm.target import Target
  from ..None import function
  from ..None import ty
  from ..backend.utils import mangle_module_name
  from .None import _backend
label_desc: Use image node_id 5 for calling a global function with example usage: lower_call(call, inputs, target, otype) and returns: LoweredOutput