code: def run_write_instructions(
      self, request_iterator, _context
  ) -> tracking_rpc.WriteInstructionsResponse:
      try:
          raw_message = []
          client_uri = None  # TODO [AD] move to header interface?
          # TODO [AD] raw_message = [request.message for request in request_iterator]
          for request in request_iterator:
              raw_message.append(request.message)
              client_uri = request.client_uri
          write_instructions = decode_tree(
              utils.unpack_bytes(raw_message)
          )
          for instruction in write_instructions:
              resource_handler, method_name, args = instruction
  
              self._verify_resource_handler(
                  resource_handler, client_uri
              )
  
              checked_args = []
              for arg in args:
                  if isinstance(arg, utils.ResourceObject):
                      handler = arg.storage["handler"]
                      self._verify_resource_handler(handler, client_uri)
                      checked_args.append(
                          self.resource_pool[handler][1].ref
                      )
                  else:
                      checked_args.append(arg)
  
              resource = self.resource_pool[resource_handler][1].ref
              if method_name.endswith(".setter"):
                  attr_name = method_name.split(".")[0]
                  setattr(resource, attr_name, checked_args[0])
              else:
                  attr = getattr(resource, method_name)
                  assert callable(attr)
                  attr(*checked_args)
  
          return tracking_rpc.WriteInstructionsResponse(
              status=tracking_rpc.WriteInstructionsResponse.Status.OK
          )
      except Exception as e:
          return tracking_rpc.WriteInstructionsResponse(
              version="0.1",
              status=tracking_rpc.WriteInstructionsResponse.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 6 for calling the RemoteTrackingServicer obj's underlying member method code with example usage: obj.run_write_instructions(request_iterator, _context) and returns: tracking_rpc, tracking_rpc