code: def test(py_ver, case):
      python_bin, python_env = prepare_all(py_ver)
  
      update_env(python_env)
  
      try:
          yatest.common.execute(
              [
                  python_bin,
                  "-m",
                  "pytest",
                  TEST_SCRIPT + "::" + case,
              ],
              env=python_env,
              cwd=yatest.common.test_output_path(),
          )
      except yatest.common.process.ExecutionError as e:
          stdout = e.execution_result.std_out
          stderr = e.execution_result.std_err
          assert 0, "python%s: %s\n%s\n%s" % (
              py_ver,
              case,
              stdout,
              stderr,
          )
  
      canonize_path = os.path.join(
          yatest.common.test_output_path(), "canonize"
      )
      if os.path.exists(canonize_path):
          canon_files = []
          with open(canonize_path) as f:
              for line in f:
                  line = line.strip()
                  args = line.split()
                  canon_file = os.path.join(
                      yatest.common.test_output_path(), args[0]
                  )
                  diff_tool = None
                  if len(args) > 1:
                      diff_tool = args[1]
                  canon_files.append(
                      yatest.common.canonical_file(
                          canon_file, diff_tool=diff_tool, local=True
                      )
                  )
          return canon_files
  
imports: import os
  import yatest.common
  from test_whl import prepare_all
label_desc: Use image node_id 3 for calling a global function with example usage: test(py_ver, case) and returns: canon_files