docs: def get_git_root(index=3):  # type: (int) -> str
      """
      Get the path of the git root directory of the caller's file
      Raises a RuntimeError if a git repository cannot be found
      """
      path = get_current_path(index=index)
      while True:
          git_path = os.path.join(path, '.git')
          if os.path.isdir(git_path):
              return path
          if os.path.dirname(path) == path:
              raise RuntimeError("Cannot find git root")
          path = os.path.split(path)[0]