code: def mkdir_p(path):
      """Equivalent of a 'mkdir -p' linux command which creates directories if they don't exist. This also correctly resolves paths with ~ in them."""
      path1 = os.path.expanduser(path)
      try:
          os.makedirs(path1)
      except OSError as exc:  # Python >2.5
          if exc.errno == errno.EEXIST and os.path.isdir(path1):
              pass
          else:
              raise
  
file_path: pywick/pywick/misc.py
imports: from enum import Enum, auto
  import errno
  import random
  import os
  import numpy
  import torch
label_desc: Use image node_id 7 for calling a global function with example usage: mkdir_p(path) without return types