code: def publish_estimator(self):
      if self.model_id is None:
          warnings.warn("No model has been trained yet!")
          return
      mlops_connection = create_mlops_connection()
      project = get_or_create_project(mlops_connection)
      published = _publish_estimator(self, mlops_connection, project)
      if (
          published
          and h2o_cloud_extensions.settings.mlops.estimator.automatic_deployment
      ):
          deploy(self)
  
imports: import h2o.h2o
  from .connect import *
  from .utils import *
  from .status import _is_model_published
  from .deploy import deploy
  import warnings
  import os
  import mimetypes
  import h2o_mlops_client
  import h2o_cloud_extensions
label_desc: Use image node_id 2 for calling a global function with example usage: publish_estimator() without return types