code: def quick_init(args, verbose=True) -> QuickInitContainer:
      """Sets up logging, initializes device(s) and random seed, prepares output dir, and saves args."
  
      Args:
          args (RunConfiguration): configuration carrying command line args specifying run params.
          verbose (bool): whether to print the input run config and the run config as saved.
  
      Returns:
          QuickInitContainer specifying the run's device, GPU count, and logging configuration.
  
      """
      if verbose:
          print_args(args)
      init_server_logging(
          server_ip=args.server_ip,
          server_port=args.server_port,
          verbose=verbose,
      )
      device, n_gpu = init_cuda_from_args(
          no_cuda=args.no_cuda,
          local_rank=args.local_rank,
          fp16=args.fp16,
          verbose=verbose,
      )
      args.seed = init_seed(
          given_seed=args.seed, n_gpu=n_gpu, verbose=verbose
      )
      init_output_dir(
          output_dir=args.output_dir,
          force_overwrite=args.force_overwrite,
      )
      log_writer = init_log_writer(output_dir=args.output_dir)
      save_args(args=args, verbose=verbose)
      return QuickInitContainer(
          device=device, n_gpu=n_gpu, log_writer=log_writer
      )
  
imports: import json
  import numpy
  import os
  import random
  import time
  import torch
  from dataclasses import dataclass
  from typing import Any
  import jiant.utils.python.io
  import jiant.utils.zlog
label_desc: Use image node_id 1 for calling a global function with example usage: quick_init(args, verbose) and returns: QuickInitContainer