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._query_inside(task.target, task.workload)
  
imports: import tvm
  import logging
  import tempfile
  import os
  import shutil
  import numpy
  from tvm.relay import testing
  from tvm import rpc
  from tvm.contrib import utils, ndk
  from tvm.relay.build_module import bind_params_by_name
  from tvm.relay.collage.collage import *
  from tvm.relay.op.contrib import clml
  import pytest
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