code: def create_model_config(
      args, benchmark_config=None, model_specs=None, device=None
  ):
      """Return a dict with the given model, dataset and optimizer."""
  
      if not device:
          device = (
              torch.device("cuda")
              if torch.cuda.is_available()
              else torch.device("cpu")
          )
      dataset_info = get_dataset_info(args)
      assert model_specs is not None
      model_specs["vocab_size"] = dataset_info.ntokens
      model, optimizer = get_model_and_optimizer(
          args, device, benchmark_config, model_specs
      )
      return {
          "model": model,
          "optimizer": optimizer,
          "dataset_info": dataset_info,
      }
  
file_path: fairscale/benchmarks/utils.py
imports: import argparse
  from functools import reduce
  import logging
  import operator
  import datasets.wikitext2_data
  from models import transformer_lm
  import numpy
  import torch
  from torch.optim import Adam
label_desc: Use image node_id 5 for calling a global function with example usage: create_model_config(args, benchmark_config, model_specs, device) and returns: dict