code: def schedule_tasks(
      tasks: List[auto_scheduler.SearchTask],
      task_weights: List[float],
      tuning_options: auto_scheduler.TuningOptions,
      prior_records: Optional[str] = None,
      log_estimated_latency: bool = False,
  ):
      """Generate the schedules for the different tasks (i.e., subgraphs) contained in the module.
      Store the schedules in a json file that will be used later by the compiler.
  
      Parameters
      ----------
      tasks : list
          A list of auto_scheduler.SearchTask to tune.
      task_weights : list
          The weight (i.e. the number of appearance) of extracted tasks
      tuning_options: auto_scheduler.TuningOptions
          The options of tuning
      prior_records : str, optional
          The json file used to preload the autoscheduler
      log_estimated_latency : bool, optional
          If true, writes the estimated runtime of the model during each step of tuning to file.
      """
      if not log_estimated_latency:
          callbacks = [auto_scheduler.task_scheduler.PrintTableInfo()]
      else:
          callbacks = [
              auto_scheduler.task_scheduler.PrintTableInfo(),
              auto_scheduler.task_scheduler.LogEstimatedLatency(
                  ("total_latency.tsv")
              ),
          ]
  
      # Create the scheduler
      tuner = auto_scheduler.TaskScheduler(
          tasks,
          task_weights,
          load_log_file=prior_records,
          callbacks=callbacks,
      )
  
      # Tune the tasks
      tuner.tune(tuning_options)
  
imports: import os.path
  import logging
  import time
  from copy import deepcopy
  from typing import Any, Optional, Dict, List, Union
  from urllib.parse import urlparse
  import tvm
  from tvm import autotvm, auto_scheduler
  from tvm.auto_scheduler.search_task import HardwareParams
  from tvm.autotvm.tuner import GATuner
  from tvm.autotvm.tuner import GridSearchTuner
  from tvm.autotvm.tuner import RandomTuner
  from tvm.autotvm.tuner import XGBTuner
  from tvm.target import Target
  from .None import TVMCException, composite_target, frontends
  from .main import register_parser
  from .model import TVMCModel
  from .target import target_from_cli, generate_target_args, reconstruct_target_args
  from .shape_parser import parse_shape_string
  from .transform import generate_transform_args, parse_graph_transform_args, apply_graph_transforms
label_desc: Use image node_id 8 for calling a global function with example usage: schedule_tasks(tasks, task_weights, tuning_options, prior_records, log_estimated_latency) without return types