<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_trial_info(current_trial):
 """Get job information for current trial."""

    if current_trial.end_time and ("_" in current_trial.end_time):
        # end time is parsed from result.json and the format
        # is like: yyyy-mm-dd_hh-MM-ss, which will be converted
        # to yyyy-mm-dd hh:MM:ss here
        time_obj = datetime.datetime.strptime(current_trial.end_time,
                                              "%Y-%m-%d_%H-%M-%S")
        end_time = time_obj.strftime("%Y-%m-%d %H:%M:%S")
    else:
        end_time = current_trial.end_time

    if current_trial.metrics:
        metrics = eval(current_trial.metrics)
    else:
        metrics = None

    trial_info = {
        "trial_id": current_trial.trial_id,
        "job_id": current_trial.job_id,
        "trial_status": current_trial.trial_status,
        "start_time": current_trial.start_time,
        "end_time": end_time,
        "params": eval(current_trial.params.encode("utf-8")),
        "metrics": metrics
    }

    return trial_info