parameters: (directory)
docstring: Make the directory, and all its ancestors as required.  Any of the
      directories are allowed to already exist.
docstring_summary: Make the directory, and all its ancestors as required.  Any of the
      directories are allowed to already exist.
docstring_tokens: Make the directory and all its ancestors as required . Any of the directories are allowed to already exist .
function: def mkdir_p(directory):
      """Make the directory, and all its ancestors as required.  Any of the
      directories are allowed to already exist."""
  
      if directory == "":
          # We're being asked to make the current directory.
          return
  
      try:
          os.makedirs(directory)
      except OSError as e:
          if e.errno == errno.EEXIST and os.path.isdir(directory):
              pass
          else:
              raise
function_tokens: def mkdir_p ( directory ) : if directory == "" : # We're being asked to make the current directory. return try : os . makedirs ( directory ) except OSError as e : if e . errno == errno . EEXIST and os . path . isdir ( directory ) : pass else : raise