code: def train_host(
      ctx,
      train_data,
      validate_data,
      train_output_data,
      output_model,
      epochs,
      batch_size,
      optimizer_param,
      learning_rate_param,
      init_param,
      floating_point_precision,
      input_model,
  ):
      if input_model is not None:
          logger.info(f"warm start model provided")
          model = input_model.read()
          module = CoordinatedLinRModuleHost.from_model(model)
          module.set_epochs(epochs)
          module.set_batch_size(batch_size)
      else:
          module = CoordinatedLinRModuleHost(
              epochs=epochs,
              batch_size=batch_size,
              optimizer_param=optimizer_param,
              learning_rate_param=learning_rate_param,
              init_param=init_param,
              floating_point_precision=floating_point_precision,
          )
      logger.info(f"coordinated linr host start train")
      sub_ctx = ctx.sub_ctx("train")
  
      train_data = train_data.read()
      if validate_data is not None:
          validate_data = validate_data.read()
      module.fit(sub_ctx, train_data, validate_data)
      model = module.get_model()
      output_model.write(
          model,
          metadata={
              "optimizer_param": optimizer_param,
              "learning_rate_param": learning_rate_param,
          },
      )
  
      sub_ctx = ctx.sub_ctx("predict")
      module.predict(sub_ctx, train_data)
      if validate_data is not None:
          sub_ctx = ctx.sub_ctx("validate_predict")
          module.predict(sub_ctx, validate_data)
  
file_path: FATE/python/fate/components/components/coordinated_linr.py
imports: import logging
  from fate.arch import Context
  from fate.arch.dataframe import DataFrame
  from fate.components.components.utils import consts, tools
  from fate.components.core import ARBITER, GUEST, HOST, Role, cpn, params
  from fate.ml.glm import CoordinatedLinRModuleArbiter, CoordinatedLinRModuleGuest, CoordinatedLinRModuleHost
label_desc: Use image node_id 6 for calling a global function with example usage: train_host(ctx, train_data, validate_data, train_output_data, output_model, epochs, batch_size, optimizer_param, learning_rate_param, init_param, floating_point_precision, input_model) without return types