code: def dumps_from_server(
      obj: Any,
      client_id: str,
      server_instance: "RayletServicer",
      protocol=None,
  ) -> bytes:
      with io.BytesIO() as file:
          sp = ServerPickler(
              client_id, server_instance, file, protocol=protocol
          )
          sp.dump(obj)
          return file.getvalue()
  
file_path: ray/python/ray/util/client/server/server_pickler.py
imports: import io
  import ray
  from typing import Any
  from typing import TYPE_CHECKING
  from ray._private.client_mode_hook import disable_client_hook
  import ray.cloudpickle
  from ray.util.client.client_pickler import PickleStub
  from ray.util.client.server.server_stubs import ClientReferenceActor
  from ray.util.client.server.server_stubs import ClientReferenceFunction
  import pickle
label_desc: Use image node_id 1 for calling a global function with example usage: dumps_from_server(obj, client_id, server_instance, protocol) and returns: file