code: def test_search_task_record():
      auto_scheduler.search_task.TASK_INPUT_BUFFER_TABLE.clear()
      N = 64
      target = "llvm"
  
      # Log with no task input
      task = auto_scheduler.SearchTask(
          func="matmul_auto_scheduler_test",
          args=(N, N, N),
          target=target,
      )
      task_record = auto_scheduler._ffi_api.SerializeSearchTask(task)
      new_task = auto_scheduler._ffi_api.DeserializeSearchTask(
          task_record
      )
      # TODO(jcf94): Check the compute dag & hardware parameter
      assert task.workload_key == new_task.workload_key
      assert str(task.target) == str(new_task.target)
      assert str(task.target.host) == str(new_task.target.host)
      assert (
          task.layout_rewrite_option == new_task.layout_rewrite_option
      )
  
      # Log with 1 task input
      test_input_0 = tvm.runtime.ndarray.empty((64, 64))
      task = auto_scheduler.SearchTask(
          func="matmul_auto_scheduler_test",
          args=(N, N, N),
          target=target,
          task_inputs={"test_input_0": test_input_0},
          task_inputs_overwrite=True,
      )
      task_record = auto_scheduler._ffi_api.SerializeSearchTask(task)
      new_task = auto_scheduler._ffi_api.DeserializeSearchTask(
          task_record
      )
      assert task.workload_key == new_task.workload_key
      assert str(task.target) == str(new_task.target)
      assert str(task.target.host) == str(new_task.target.host)
      assert (
          task.layout_rewrite_option == new_task.layout_rewrite_option
      )
      assert len(new_task.task_input_names) == 1
      assert new_task.task_input_names[0] == "test_input_0"
  
      # Log with multiple task inputs
      test_input_1 = tvm.runtime.ndarray.empty((64, 64))
      task = auto_scheduler.SearchTask(
          func="matmul_auto_scheduler_test",
          args=(N, N, N),
          target=target,
          task_inputs={
              "test_input_0": test_input_0,
              "test_input_1": test_input_1,
          },
          task_inputs_overwrite=True,
      )
      task_record = auto_scheduler._ffi_api.SerializeSearchTask(task)
      new_task = auto_scheduler._ffi_api.DeserializeSearchTask(
          task_record
      )
      assert task.workload_key == new_task.workload_key
      assert str(task.target) == str(new_task.target)
      assert str(task.target.host) == str(new_task.target.host)
      assert (
          task.layout_rewrite_option == new_task.layout_rewrite_option
      )
      assert len(new_task.task_input_names) == 2
      assert new_task.task_input_names[0] == "test_input_0"
      assert new_task.task_input_names[1] == "test_input_1"
  
      # Log with version 0.5
      v5_log = """["[\\\"matmul_auto_scheduler_test\\\", 64, 64, 64]", "llvm -keys=cpu", [6, 64, 64, 0, 0, 0, 0, 0], "", 1]"""
      new_task = auto_scheduler._ffi_api.DeserializeSearchTask(v5_log)
      assert task.workload_key == new_task.workload_key
      assert str(task.target) == str(new_task.target)
      assert str(task.target.host) == str(new_task.target.host)
      assert (
          task.layout_rewrite_option == new_task.layout_rewrite_option
      )
      assert len(new_task.task_input_names) == 0
  
file_path: tvm/tests/python/auto_scheduler/test_auto_scheduler_search_task.py
imports: import numpy
  import tempfile
  import tvm
  import tvm.testing
  from tvm import auto_scheduler
  from tvm.auto_scheduler.utils import get_const_tuple
  from tvm.testing.auto_scheduler import matmul_auto_scheduler_test, zero_rank_compute_auto_scheduler_test, zero_rank_reduce_auto_scheduler_test
label_desc: Use image node_id 2 for calling a global function with example usage: test_search_task_record() without return types