docs: def train_async(input_dir, batch_size, max_steps, output_dir, checkpoint=None, cloud=None):
    """Train model. The output can be used for batch prediction or online deployment.
  
    Args:
      input_dir: A directory path containing preprocessed results. Can be local or GCS path.
      batch_size: size of batch used for training.
      max_steps: number of steps to train.
      output_dir: The output directory to use. Can be local or GCS path.
      checkpoint: the Inception checkpoint to use. If None, a default checkpoint is used.
      cloud: a google.datalab.ml.CloudTrainingConfig object to let it run in cloud.
          If None, it runs locally.
  
    Returns:
      A google.datalab.utils.Job object that can be used to query state from or wait.
    """
    with warnings.catch_warnings():
      warnings.simplefilter("ignore")
      if cloud is None:
        return _local.Local.train(input_dir, batch_size, max_steps, output_dir, checkpoint)
  
      return _cloud.Cloud.train(input_dir, batch_size, max_steps, output_dir, checkpoint, cloud)