code: def create_task(
      func, args, target, target_host=None, hardware_params=None
  ):
      """THIS API IS DEPRECATED.
  
      Create a search task.
  
      Parameters
      ----------
      func : Union[Function, str]
          The function that returns the compute declaration Tensors.
          Can be the a function or the function name.
      args : Union[Tuple[Any, ...], List[Any]]
          The args of the function.
      target : Union[tvm.target.Target, str]
          The target device of this search task.
      target_host : Optional[Union[tvm.target.Target, str]]
          The target host device of this search task.
      hardware_params : Optional[HardwareParams]
          Hardware parameters used in this search task.
  
      Returns
      -------
          SearchTask: the created task
      """
      raise ValueError(
          'The API "auto_scheduler.create_task" is deprecated.'
          "See https://github.com/apache/tvm/pull/7028 for the upgrade guide"
      )
  
imports: import json
  import os
  import logging
  import numpy
  import tvm._ffi
  from tvm.runtime import Object, ndarray
  from tvm.driver.build_module import build
  from tvm.target import Target
  from .measure import LocalBuilder, LocalRunner
  from .measure_record import load_best_record
  from .workload_registry import make_workload_key
  from .compute_dag import ComputeDAG, LayoutRewriteOption
  from .cost_model import XGBModel
  from .search_policy import SketchPolicy
  from .workload_registry import WORKLOAD_FUNC_REGISTRY, register_workload_tensors
  from .None import _ffi_api
label_desc: Use image node_id 5 for calling a global function with example usage: create_task(func, args, target, target_host, hardware_params) without return types