<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def save_params(step_num, model, trainer, ckpt_dir):
 """Save the model parameter, marked by step_num."""

    param_path = os.path.join(ckpt_dir, '%07d.params'%step_num)
    trainer_path = os.path.join(ckpt_dir, '%07d.states'%step_num)
    logging.info('[step %d] Saving checkpoints to %s, %s.',
                 step_num, param_path, trainer_path)
    model.save_parameters(param_path)
    trainer.save_states(trainer_path)