class_docstr: Cost model.
class_docstr_tok: ["Cost","model","."]
docstr: Create a CostModel.
  
  Parameters
  ----------
  kind : Literal["xgb", "mlp", "random", "none"]
      The kind of the cost model. Can be "xgb", "mlp", "random" or "none".
  
  Returns
  -------
  cost_model : CostModel
      The created cost model.
docstr_tok: ["Create","a","CostModel",".","Parameters","--","--","--","--","--","kind",":","Literal","[","``","xgb","''",",","``","mlp","''",",","``","random","''",",","``","none","''","]","The","kind","of","the","cost","model",".","Can","be","``","xgb","''",",","``","mlp","''",",","``","random","''","or","``","none","''",".","Returns","--","--","--","-","cost_model",":","CostModel","The","created","cost","model","."]
code: def create(
      kind: Literal["xgb", "mlp", "random", "none"],
      *args,
      **kwargs,
  ) -> "CostModel":
      """Create a CostModel.
  
      Parameters
      ----------
      kind : Literal["xgb", "mlp", "random", "none"]
          The kind of the cost model. Can be "xgb", "mlp", "random" or "none".
  
      Returns
      -------
      cost_model : CostModel
          The created cost model.
      """
      from . import (
          RandomModel,
          XGBModel,
      )  # pylint: disable=import-outside-toplevel
  
      if kind == "xgb":
          return XGBModel(*args, **kwargs)  # type: ignore
  
      # params only relevant to XGBModel
      _xgb_params = ["num_tuning_cores", "tree_method"]
  
      for param in _xgb_params:
          if param in kwargs:
              kwargs.pop(param)
  
      if kind == "random":
          return RandomModel(*args, **kwargs)  # type: ignore
      if kind == "mlp":
          from .mlp_model import (  # type: ignore  # pylint: disable=import-outside-toplevel
              MLPModel,
          )
  
          return MLPModel(*args, **kwargs)  # type: ignore
      if kind == "none":
          return None  # no cost model required
      raise ValueError(f"Unknown CostModel: {kind}")
  
imports: import ctypes
  from typing import Callable, List, Union
  from typing_extensions import Literal
  import numpy
  from tvm._ffi import register_object
  from tvm.runtime import Object
  from ..None import _ffi_api
  from ..runner import RunnerResult
  from ..search_strategy import MeasureCandidate
  from ..tune_context import TuneContext
  from ..utils import _get_default_str
label_desc: Use image node_id 5 for calling the CostModel obj's underlying member method code with example usage: obj.create(kind) and returns: XGBModel, RandomModel, MLPModel, None