class_docstr: A SearchCallback for SketchSearchPolicy that allows users to add
  custom sketch rule.
  
  Notes
  -----
  This is an advanced feature. Make sure you're clear how it works and this should only be used
  in SketchSearchPolicy.
  
  Parameters
  ----------
  meet_condition_func: Callable
      A function with `(policy, state, stage_id) -> int`. Should return one of the result
      enumeration.
  apply_func: Callable
      A function with `(policy, state, stage_id) -> [[State, int], ...]`.
  rule_name: str = "CustomSketchRule"
      The name of this custom sketch rule.
class_docstr_tok: ["A","SearchCallback","for","SketchSearchPolicy","that","allows","users","to","add","custom","sketch","rule",".","Notes","--","--","-","This","is","an","advanced","feature",".","Make","sure","you","'re","clear","how","it","works","and","this","should","only","be","used","in","SketchSearchPolicy",".","Parameters","--","--","--","--","--","meet_condition_func",":","Callable","A","function","with","`","(","policy",",","state",",","stage_id",")","-",">","int","`",".","Should","return","one","of","the","result","enumeration",".","apply_func",":","Callable","A","function","with","`","(","policy",",","state",",","stage_id",")","-",">","[","[","State",",","int","]",",","...","]","`",".","rule_name",":","str","=","``","CustomSketchRule","''","The","name","of","this","custom","sketch","rule","."]
code: def __init__(
      self,
      meet_condition_func,
      apply_func,
      rule_name="CustomSketchRule",
  ):
      self.__init_handle_by_constructor__(
          _ffi_api.PreloadCustomSketchRule,
          meet_condition_func,
          apply_func,
          rule_name,
      )
  
imports: import random
  import tvm._ffi
  from tvm.runtime import Object
  from .cost_model import RandomModel
  from .None import _ffi_api
label_desc: Use image node_id 1 to create a new PreloadCustomSketchRule object from inherited base classes: SearchCallback with example: obj = PreloadCustomSketchRule(meet_condition_func, apply_func, rule_name)