code: def make_record(step, hparams_seed, envs):
      """envs is a list of (in_acc, out_acc, is_test_env) tuples"""
      result = {
          "args": {"test_envs": [], "hparams_seed": hparams_seed},
          "step": step,
      }
      for i, (in_acc, out_acc, is_test_env) in enumerate(envs):
          if is_test_env:
              result["args"]["test_envs"].append(i)
          result[f"env{i}_in_acc"] = in_acc
          result[f"env{i}_out_acc"] = out_acc
      return result
  
imports: import argparse
  import itertools
  import json
  import os
  import subprocess
  import sys
  import time
  import unittest
  import uuid
  import torch
  from domainbed import model_selection
  from domainbed.lib.query import Q
  from parameterized import parameterized
label_desc: Use image node_id 1 for calling a global function with example usage: make_record(step, hparams_seed, envs) and returns: result