code: def mkdir(cls, directory):
          
          directory = path_expand(directory)
          try:
              os.makedirs(directory)
          except OSError as e:
  
              # EEXIST (errno 17) occurs under two conditions when the path exists:
              # - it is a file
              # - it is a directory
              #
              # if it is a file, this is a valid error, otherwise, all
              # is fine.
              if e.errno == errno.EEXIST and os.path.isdir(directory):
                  pass
              else:
                  raise
docs: creates a directory with all its parents in ots name
          :param directory: the path of the directory
          :return: