code: def setup_store_with_metadata(args):
      """
      Sets up a store for training according to the arguments object. See the
      argparse object above for options.
      """
      # Add git commit to args
      try:
          repo = git.Repo(
              path=os.path.dirname(os.path.realpath(__file__)),
              search_parent_directories=True,
          )
          version = repo.head.object.hexsha
      except git.exc.InvalidGitRepositoryError:
          version = __version__
      args.version = version
  
      # Create the store
      store = cox.store.Store(args.out_dir, args.exp_name)
      args_dict = args.__dict__
      schema = cox.store.schema_from_dict(args_dict)
      store.add_table("metadata", schema)
      store["metadata"].append_row(args_dict)
  
      return store
  
file_path: robustness/robustness/main.py
imports: from argparse import ArgumentParser
  import os
  import git
  import torch
  import cox
  import cox.utils
  import cox.store
label_desc: Use image node_id 3 for calling a global function with example usage: setup_store_with_metadata(args) and returns: store