code: def prepare_resource_registry():
      registry = ResourceTypeRegistry()
      registry.register("TreeView", get_tree)
      registry.register("StructuredRun", get_structured_run)
      registry.register("Repo", get_repo)
      registry.register("Lock", get_lock)
      registry.register("RunHeartbeat", get_run_heartbeat)
      registry.register("FileManager", get_file_manager)
      return registry
  
imports: import os
  import time
  from typing import Optional
  from concurrent import futures
  from aim.ext.cleanup import AutoClean
  from aim.ext.transport.config import AIM_RT_MAX_MESSAGE_SIZE, AIM_RT_DEFAULT_MAX_MESSAGE_SIZE
  from aim.ext.transport.handlers import get_tree, get_structured_run, get_repo, get_lock, get_run_heartbeat, get_file_manager
  from aim.ext.transport.heartbeat import RPCHeartbeatWatcher
  from aim.ext.transport.worker import RemoteWorker, LocalWorker
  from aim.ext.transport.health import HealthServicer, health_pb2_grpc
  from aim.ext.transport.router import RemoteRouterServicer, router_pb2_grpc
  from aim.ext.transport.remote_tracking import RemoteTrackingServicer, tracking_pb2_grpc, ResourceTypeRegistry
label_desc: Use image node_id 2 for calling a global function with example usage: prepare_resource_registry() and returns: registry