code: def make_dirs(path):
      """Create directories (equivalent of ``mkdir -p``)."""
      if path[-1] == "/":
          parent = os.path.dirname(path[:-1])
      else:
          parent = os.path.dirname(path)
  
      if len(parent) > 0:
          if not os.path.exists(parent):
              make_dirs(parent)
  
      if not os.path.exists(path):
          os.mkdir(path, 0o777)
      else:
          assert os.path.isdir(path)
  
imports: from collections import namedtuple
  from hashlib import sha256
  import os
  import shutil
  import sys
  import fnmatch
  from sympy.testing.pytest import XFAIL
label_desc: Use image node_id 3 for calling a global function with example usage: make_dirs(path) without return types