code: def is_already_tuned(task, log_filename):
      """Returns True if we already have a tuning record for task in turning logs in log_filename"""
      if not os.path.exists(log_filename):
          return False
  
      dispatch_context = tvm.autotvm.task.ApplyHistoryBest(log_filename)
      return dispatch_context.contains(task.target, task.workload)
  
imports: import tvm
  import logging
  import tempfile
  import os
  import shutil
  import menangerie
  from tvm.relay.op.contrib.cutlass import partition_for_cutlass
  from tvm.contrib.cutlass import num_cutlass_partitions
  from tvm.relay.op.contrib.cublas import partition_for_cublas
  from tvm.relay.op.contrib.cudnn import partition_for_cudnn
label_desc: Use image node_id 3 for calling a global function with example usage: is_already_tuned(task, log_filename) and returns: dispatch_context, False