code: def check_workspace(testclass, db, key):
      tmpdir = os.path.join(tempfile.gettempdir(), str(uuid.uuid4()))
      os.mkdir(tmpdir)
      experiment = retry(lambda: db.get_experiment(key), sleep_time=5)
      artifact = experiment.artifacts["workspace"]
      localpath = retry(
          lambda: db.get_artifact(artifact, tmpdir, only_newer=False),
          sleep_time=5,
      )
  
      for _, _, files in os.walk(localpath, topdown=False):
          for filename in files:
              downloaded_filename = os.path.join(tmpdir, filename)
              if downloaded_filename.endswith(".pyc"):
                  continue
  
              with open(downloaded_filename, "rb") as f1:
                  data1 = f1.read()
              with open(
                  os.path.join(db.get_artifact(artifact), filename),
                  "rb",
              ) as f2:
                  data2 = f2.read()
  
              testclass.assertTrue(
                  data1 == data2,
                  (
                      "File comparison between local {} "
                      + "and downloaded {} has failed"
                  ).format(filename, downloaded_filename),
              )
  
      for _, _, files in os.walk("tmpdir", topdown=False):
          for filename in files:
              downloaded_filename = os.path.join(tmpdir, filename)
              with open(downloaded_filename, "rb") as f1:
                  data1 = f1.read()
              with open(filename, "rb") as f2:
                  data2 = f2.read()
  
              testclass.assertTrue(data1 == data2)
  
      shutil.rmtree(tmpdir)
  
imports: import unittest
  import os
  import shutil
  import tempfile
  import uuid
  import subprocess
  import time
  from timeout_decorator import timeout
  import traceback
  import numpy
  import glob
  from studio import model
  from studio.util import logs
  from studio.queues.local_queue import LocalQueue, get_local_queue_lock
  from studio.util.util import sixdecode, retry
  from studio.extra_util import has_aws_credentials
  from env_detect import on_gcp, on_aws
label_desc: Use image node_id 2 for calling a global function with example usage: check_workspace(testclass, db, key) without return types