code: def train(input_dir, batch_size, max_steps, output_dir, checkpoint):
      
      from google.datalab.utils import LambdaJob
  
      if checkpoint is None:
        checkpoint = _util._DEFAULT_CHECKPOINT_GSURL
  
      labels = _util.get_labels(input_dir)
      model = _model.Model(labels, 0.5, checkpoint)
      task_data = {'type': 'master', 'index': 0}
      task = type('TaskSpec', (object,), task_data)
      job = LambdaJob(lambda: _trainer.Trainer(input_dir, batch_size, max_steps, output_dir,
                                               model, None, task).run_training(), 'training')
      return job
docs: Train model locally.