code: def check():
      files_contents = []
      scores = []
  
      file_pattern = "__FILE_PATTERN__"
      eval_type = "__EVAL_TYPE__"
  
      with open("../should_contain.txt", "r") as f:
          should_contain = eval(f.read())
          assert type(should_contain) == list, "TERMINATE\n"
          should_contain = [
              base64.b64decode(encoded).decode("utf-8")
              for encoded in should_contain
          ]
  
      with open("../should_not_contain.txt", "r") as f:
          should_not_contain = eval(f.read())
          assert type(should_not_contain) == list, "TERMINATE\n"
          should_not_contain = [
              base64.b64decode(encoded).decode("utf-8")
              for encoded in should_not_contain
          ]
  
      # Check if file pattern is a file extension
      if file_pattern.startswith("."):
          # Find all files with the given extension in the workspace
          matching_files = glob.glob(os.path.join("*" + file_pattern))
      else:
          matching_files = [file_pattern]
  
      for file_path in matching_files:
          if eval_type == "python":
              # copy the test file to working directory
              shutil.copy(f"../custom_python/{file_path}", "./")
              result = subprocess.run(
                  [sys.executable, file_path],
                  cwd=os.path.abspath("./"),
                  capture_output=True,
                  text=True,
              )
              if "error" in result.stderr or result.returncode != 0:
                  print(result.stderr)
                  assert False, result.stderr
              files_contents.append(f"Output: {result.stdout}\n")
          elif eval_type == "file":
              with open(file_path, "r") as f:
                  files_contents.append(f.read())
          else:
              raise Exception(
                  f"eval_type {eval_type} currently not supported! (only python, file is supported) TERMINATE\n"
              )
  
      for content in files_contents:
          # print("\033[1;34mScoring content:\033[0m", content)
          score = scoring(content, should_contain, should_not_contain)
          scores.append(score)
  
      if 1.0 in scores:
          print("ALL TESTS PASSED!\n\nTERMINATE.")
      else:
          print("Test failed.")
  
file_path: autogen/samples/tools/testbed/scenarios/AutoGPT/Templates/TwoAgents/check.py
imports: import base64
  import glob
  import os
  import subprocess
  import sys
  import shutil
label_desc: Use image node_id 2 for calling a global function with example usage: check() without return types