code: def get_tree(**kwargs):
      repo_path = os.environ.get(AIM_SERVER_MOUNTED_REPO_PATH)
      if repo_path:
          repo = Repo.from_path(repo_path)
      else:
          repo = Repo.default_repo()
      name = kwargs["name"]
      sub = kwargs["sub"]
      read_only = kwargs["read_only"]
      from_union = kwargs["from_union"]
      index = kwargs["index"]
      timeout = kwargs["timeout"]
      no_cache = kwargs.get("no_cache", False)
      if index:
          return ResourceRef(repo._get_index_tree(name, timeout))
      else:
          return ResourceRef(
              repo.request_tree(
                  name,
                  sub,
                  read_only=read_only,
                  from_union=from_union,
                  no_cache=no_cache,
              )
          )
  
imports: import os
  import uuid
  import pathlib
  import pytz
  from datetime import datetime
  from aim.ext.transport.config import AIM_SERVER_MOUNTED_REPO_PATH
  from aim.sdk import Repo
  from aim.sdk.reporter import RunStatusReporter, ScheduledStatusReporter
  from aim.sdk.reporter.file_manager import LocalFileManager
  from aim.ext.cleanup import AutoClean
label_desc: Use image node_id 2 for calling a global function with example usage: get_tree() and returns: ResourceRef, ResourceRef