code: def list_directories(dir_pathname,
                       recursive=True,
                       topdown=True,
                       followlinks=False):
      
      for root, dirnames, filenames\
      in walk(dir_pathname, recursive, topdown, followlinks):
          for dirname in dirnames:
              yield absolute_path(os.path.join(root, dirname))
docs: Enlists all the directories using their absolute paths within the specified
      directory, optionally recursively.
  
      :param dir_pathname:
          The directory to traverse.
      :param recursive:
          ``True`` for walking recursively through the directory tree;
          ``False`` otherwise.
      :param topdown:
          Please see the documentation for :func:`os.walk`
      :param followlinks:
          Please see the documentation for :func:`os.walk`