code: def build_osx(
      self,
      computing_session,
      host: str,
      port: int,
      mode=FederationMode.MESSAGE_QUEUE,
      options: dict = None,
  ):
      if options is None:
          options = {}
      if mode == FederationMode.MESSAGE_QUEUE:
          from fate.arch.federation.backends.osx import OSXFederation
  
          return OSXFederation.from_conf(
              federation_session_id=self._federation_id,
              computing_session=computing_session,
              party=self._party,
              parties=self._parties,
              host=host,
              port=port,
              max_message_size=options.get("max_message_size"),
          )
      else:
          from fate.arch.computing.backends.eggroll import CSession
          from fate.arch.federation.backends.eggroll import (
              EggrollFederation,
          )
  
          if not isinstance(computing_session, CSession):
              raise RuntimeError(
                  f"Eggroll federation type requires Eggroll computing type, `{type(computing_session)}` found"
              )
  
          return EggrollFederation(
              computing_session=computing_session,
              federation_session_id=self._federation_id,
              party=self._party,
              parties=self._parties,
              proxy_endpoint=f"{host}:{port}",
          )
  
file_path: FATE/python/fate/arch/federation/_builder.py
imports: import typing
  from enum import Enum
  from fate.arch.federation.api import PartyMeta
  from fate.arch.config import cfg
label_desc: Use image node_id 4 for calling the FederationBuilder obj's underlying member method code with example usage: obj.build_osx(computing_session, host, port, mode, options) and returns: OSXFederation, EggrollFederation