code: def get_resource(
      self, request: tracking_rpc.ResourceRequest, _context
  ):
      if not request.handler:
          resource_handler = get_handler()
      else:
          resource_handler = request.handler
  
      try:
          resource_cls = self.registry[request.resource_type]
          if len(request.args) > 0:
              kwargs = decode_tree(utils.unpack_args(request.args))
              checked_kwargs = {}
              for argname, arg in kwargs.items():
                  if isinstance(arg, utils.ResourceObject):
                      handler = arg.storage["handler"]
                      self._verify_resource_handler(
                          handler, request.client_uri
                      )
                      checked_kwargs[argname] = self.resource_pool[
                          handler
                      ][1].ref
                  else:
                      checked_kwargs[argname] = arg
  
              res = resource_cls(**checked_kwargs)
          else:
              res = resource_cls()
  
          self.resource_pool[resource_handler] = (
              request.client_uri,
              res,
          )
          return tracking_rpc.ResourceResponse(
              handler=resource_handler,
              status=tracking_rpc.ResourceResponse.Status.OK,
          )
      except Exception as e:
          try:
              # clean up resource_pool
              # because no one will call release_resource in case of Exception
              del self.resource_pool[resource_handler]
          except KeyError:
              pass
  
          return tracking_rpc.ResourceResponse(
              handler=None,
              status=tracking_rpc.ResourceResponse.Status.ERROR,
              exception=utils.build_exception(e),
          )
  
file_path: aim/aim/ext/transport/remote_tracking.py
imports: from typing import Dict, Union
  import aim.ext.transport.proto.remote_tracking_pb2
  import aim.ext.transport.proto.remote_tracking_pb2_grpc
  import aim.ext.transport.message_utils
  from aim.ext.transport.handlers import get_handler
  from aim.storage.treeutils import encode_tree, decode_tree
label_desc: Use image node_id 3 for calling the RemoteTrackingServicer obj's underlying member method code with example usage: obj.get_resource(request, _context) and returns: tracking_rpc, tracking_rpc