code: def test_meta_schedule_task_scheduler_override_next_task_id_only():  # pylint: disable=invalid-name
      max_trials_per_task = 101
      tasks = [
          ms.TuneContext(
              MatmulModule,
              target=tvm.target.Target("llvm"),
              space_generator=_schedule_matmul,
              search_strategy=ms.search_strategy.ReplayTrace(),
              task_name="Matmul",
              rand_state=42,
          ),
          ms.TuneContext(
              MatmulReluModule,
              target=tvm.target.Target("llvm"),
              space_generator=_schedule_matmul,
              search_strategy=ms.search_strategy.ReplayTrace(),
              task_name="MatmulRelu",
              rand_state=0xDEADBEEF,
          ),
          ms.TuneContext(
              BatchMatmulModule,
              target=tvm.target.Target("llvm"),
              space_generator=_schedule_batch_matmul,
              search_strategy=ms.search_strategy.ReplayTrace(),
              task_name="BatchMatmul",
              rand_state=0x114514,
          ),
      ]
      database = ms.database.MemoryDatabase()
      scheduler = MyTaskScheduler()
      scheduler.tune(
          tasks,
          task_weights=[1.0] * len(tasks),
          builder=DummyBuilder(),
          runner=DummyRunner(),
          database=database,
          measure_callbacks=[ms.measure_callback.AddToDatabase()],
          max_trials_global=max_trials_per_task * len(tasks),
          max_trials_per_task=max_trials_per_task,
          num_trials_per_iter=6,
          cost_model=None,
      )
      assert len(database) == max_trials_per_task * len(tasks)
      for task in tasks:
          assert (
              len(
                  database.get_top_k(
                      database.commit_workload(task.mod),
                      100000,
                  )
              )
              == max_trials_per_task
          )
  
imports: import random
  import weakref
  from typing import Set
  import pytest
  import tvm
  import tvm.testing
  from tvm import meta_schedule
  from tvm.meta_schedule.testing.dummy_object import DummyBuilder, DummyRunner
  from tvm.script import tir
  from tvm.tir import Schedule
label_desc: Use image node_id 7 for calling a global function with example usage: test_meta_schedule_task_scheduler_override_next_task_id_only() without return types