code: def print_tree(start_path, depth=-1, pretty=True):
      """Print directory/file tree structure
  
      Parameters
      ----------
      start_path: String
          Root directory path, whose children should be traversed and printed
      depth: Integer, default=-1
          Maximum number of subdirectories allowed to be between the root `start_path` and the current
          element. -1 allows all child directories beneath `start_path` to be traversed
      pretty: Boolean, default=True
          If True, directory names will be bolded
  
      Examples
      --------
      >>> from tempfile import TemporaryDirectory
      >>> with TemporaryDirectory(dir="") as d:
      ...     os.mkdir(f"{d}/root")
      ...     os.mkdir(f"{d}/root/sub_a")
      ...     os.mkdir(f"{d}/root/sub_a/sub_b")
      ...     _ = open(f"{d}/root/file_0.txt", "w+")
      ...     _ = open(f"{d}/root/file_1.py", "w+")
      ...     _ = open(f"{d}/root/sub_a/file_2.py", "w+")
      ...     _ = open(f"{d}/root/sub_a/sub_b/file_3.txt", "w+")
      ...     _ = open(f"{d}/root/sub_a/sub_b/file_4.py", "w+")
      ...     print_tree(f"{d}/root", pretty=False)
      ...     print("#" * 50)
      ...     print_tree(f"{d}/root", depth=2, pretty=False)
      ...     print("#" * 50)
      ...     print_tree(f"{d}/root/", pretty=False)
      |-- root/
      |   |-- file_0.txt
      |   |-- file_1.py
      |   |-- sub_a/
      |   |   |-- file_2.py
      |   |   |-- sub_b/
      |   |   |   |-- file_3.txt
      |   |   |   |-- file_4.py
      ##################################################
      |-- root/
      |   |-- file_0.txt
      |   |-- file_1.py
      |   |-- sub_a/
      |   |   |-- file_2.py
      ##################################################
      root/
      |-- file_0.txt
      |-- file_1.py
      |-- sub_a/
      |   |-- file_2.py
      |   |-- sub_b/
      |   |   |-- file_3.txt
      |   |   |-- file_4.py"""
      prefix = 0
  
      if start_path != "/":
          if start_path.endswith("/"):
              # If True, the last dir in start_path will be treated as root, rather than the whole thing
              start_path = start_path[:-1]
              prefix = len(start_path)
  
      for root, dirs, files in os.walk(start_path):
          level = root[prefix:].count(os.sep)
          if level > depth > -1:
              continue
  
          indent = ""
  
          if level > 0:
              indent = "|   " * (level - 1) + "|-- "
          sub_indent = "|   " * (level) + "|-- "
  
          content = "{}{}/".format(indent, real_name(root))
          if pretty:
              content = "\u001b[;1m" + content + "\u001b[0m"
  
          print(content)
  
          for d in sorted(dirs):
              if os.path.islink(os.path.join(root, d)):
                  content = "{}{}".format(
                      sub_indent, real_name(d, root=root)
                  )
                  print(content)
  
          for f in sorted(files):
              content = "{}{}".format(
                  sub_indent, real_name(f, root=root)
              )
              print(content)
  
imports: from hyperparameter_hunter.settings import G
  from contextlib import suppress
  from inspect import signature
  import numpy
  import os
  import os.path
  import pandas
  import simplejson
  from typing import Union
  import wrapt
label_desc: Use image node_id 9 for calling a global function with example usage: print_tree(start_path, depth, pretty) without return types