code: def mkdir_p(path, log=True):
      """Create a directory for the specified path.
      Parameters
      ----------
      path : str
          Path name
      log : bool
          Whether to print result for directory creation
      """
      try:
          os.makedirs(path)
          if log:
              print("Created directory {}".format(path))
      except OSError as exc:
          if exc.errno == errno.EEXIST and os.path.isdir(path) and log:
              print("Directory {} already exists.".format(path))
          else:
              raise
  
imports: import sys
  import datetime
  import dgl
  import errno
  import numpy
  import os
  import pickle
  import random
  import torch
  from dgl.data.utils import download, get_download_dir, _get_dgl_url
  import os.path
  from pprint import pprint
  from scipy import sparse
  from scipy import io
label_desc: Use image node_id 2 for calling a global function with example usage: mkdir_p(path, log) without return types