class_docstr: Base class for model publisher. All publishers should subclass from this so that
  they can be registered in the workflows.
docstr: This method takes RLTrainingOutput so that it can extract anything it
  might need from it.
  
  ModelManager is given here so that config can be shared
code: def publish(
      self,
      model_manager: ModelManager,
      training_output: RLTrainingOutput,
      setup_data: Optional[Dict[str, bytes]],
      # Mapping from serving_module name -> recurring_workflow_id
      recurring_workflow_ids: ModuleNameToEntityId,
      child_workflow_id: int,
      recurring_period: Optional[RecurringPeriod],
  ):
      """
      This method takes RLTrainingOutput so that it can extract anything it
      might need from it.
  
      ModelManager is given here so that config can be shared
      """
      result = self.do_publish(
          model_manager,
          training_output,
          setup_data,
          recurring_workflow_ids,
          child_workflow_id,
          recurring_period,
      )
      # Avoid circular dependency at import time
      from reagent.workflow.types import PublishingResult__Union
  
      # We need to use inspection because the result can be a future when running on
      # FBL
      result_type = inspect.signature(self.do_publish).return_annotation
      assert result_type != inspect.Signature.empty
      # pyre-fixme[16]: `PublishingResult__Union` has no attribute
      #  `make_union_instance`.
      # pyre-fixme[16]: `PublishingResult__Union` has no attribute
      #  `make_union_instance`.
      return PublishingResult__Union.make_union_instance(
          result, result_type
      )
  
file_path: ReAgent/reagent/publishers/model_publisher.py
imports: import abc
  import inspect
  from typing import Dict, Optional
  from reagent.core.registry_meta import RegistryMeta
  from reagent.core.result_registries import PublishingResult
  from reagent.model_managers.model_manager import ModelManager
  from reagent.workflow.types import ModuleNameToEntityId, RecurringPeriod, RLTrainingOutput
label_desc: Use image node_id 1 for calling the ModelPublisher obj's underlying member method code with example usage: obj.publish(model_manager, training_output, setup_data, recurring_workflow_ids, child_workflow_id, recurring_period) and returns: PublishingResult__Union