code: def eval_model(args, model, loader, store):
      """
      Evaluate a model for standard (and optionally adversarial) accuracy.
  
      Args:
          args (object) : A list of arguments---should be a python object
              implementing ``getattr()`` and ``setattr()``.
          model (AttackerModel) : model to evaluate
          loader (iterable) : a dataloader serving `(input, label)` batches from
              the validation set
          store (cox.Store) : store for saving results in (via tensorboardX)
      """
      check_required_args(args, eval_only=True)
      start_time = time.time()
  
      if store is not None:
          store.add_table(consts.LOGS_TABLE, consts.LOGS_SCHEMA)
      writer = store.tensorboard if store else None
  
      assert not hasattr(
          model, "module"
      ), "model is already in DataParallel."
      model = ch.nn.DataParallel(model)
  
      prec1, nat_loss = _model_loop(
          args, "val", loader, model, None, 0, False, writer
      )
  
      adv_prec1, adv_loss = float("nan"), float("nan")
      if args.adv_eval:
          args.eps = (
              eval(str(args.eps)) if has_attr(args, "eps") else None
          )
          args.attack_lr = (
              eval(str(args.attack_lr))
              if has_attr(args, "attack_lr")
              else None
          )
          adv_prec1, adv_loss = _model_loop(
              args, "val", loader, model, None, 0, True, writer
          )
      log_info = {
          "epoch": 0,
          "nat_prec1": prec1,
          "adv_prec1": adv_prec1,
          "nat_loss": nat_loss,
          "adv_loss": adv_loss,
          "train_prec1": float("nan"),
          "train_loss": float("nan"),
          "time": time.time() - start_time,
      }
  
      # Log info into the logs table
      if store:
          store[consts.LOGS_TABLE].append_row(log_info)
      return log_info
  
file_path: robustness/robustness/train.py
imports: import torch
  import numpy
  import torch.nn
  from torch.optim import SGD, lr_scheduler
  from torchvision.utils import make_grid
  from cox.utils import Parameters
  from .tools import helpers
  from .tools.helpers import AverageMeter, ckpt_at_epoch, has_attr
  from .tools import constants
  import dill
  import os
  import time
  import warnings
label_desc: Use image node_id 3 for calling a global function with example usage: eval_model(args, model, loader, store) and returns: log_info