docstr: List all the directories give a path and return.
  
  Will return an empty list if the path does not exist.
  
  :param path: Path to look into to list all directories.
  :type path: Path
  
  :returns: List of all directories found in this path.
  :rtype: List[str]
docstr_tok: ["List","all","the","directories","give","a","path","and","return",".","Will","return","an","empty","list","if","the","path","does","not","exist",".",":","param","path",":","Path","to","look","into","to","list","all","directories",".",":","type","path",":","Path",":","returns",":","List","of","all","directories","found","in","this","path",".",":","rtype",":","List","[","str","]"]
code: def list_sub_directories(path) -> List[str]:
      """List all the directories give a path and return.
  
      Will return an empty list if the path does not exist.
  
      :param path: Path to look into to list all directories.
      :type path: Path
  
      :returns: List of all directories found in this path.
      :rtype: List[str]
      """
      target_dir = Path(path)
      if target_dir.exists():
          return os.listdir(target_dir)
      else:
          return []
  
file_path: responsible-ai-toolbox/responsibleai/responsibleai/_tools/shared/state_directory_management.py
imports: import os
  import uuid
  from pathlib import Path
  from typing import List
label_desc: Use image node_id 8 for calling the DirectoryManager obj's underlying member method code with example usage: obj.list_sub_directories(path) and returns: os, list