code: def setup_log_dir(args, sampling=False):
      """Name and create directory for logging.
      Parameters
      ----------
      args : dict
          Configuration
      Returns
      -------
      log_dir : str
          Path for logging directory
      sampling : bool
          Whether we are using sampling based training
      """
      date_postfix = get_date_postfix()
      log_dir = os.path.join(
          args["log_dir"], "{}_{}".format(args["dataset"], date_postfix)
      )
  
      if sampling:
          log_dir = log_dir + "_sampling"
  
      mkdir_p(log_dir)
      return log_dir
  
imports: import datetime
  import errno
  import os
  import pickle
  import random
  from pprint import pprint
  import dgl
  import numpy
  import torch
  from dgl.data.utils import _get_dgl_url, download, get_download_dir
  from scipy import io, sparse
label_desc: Use image node_id 4 for calling a global function with example usage: setup_log_dir(args, sampling) and returns: log_dir