<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def load_chkpt_vars(model_path):
 """ Load all variables from a checkpoint to a dict. Args: model_path(str):
 path to a checkpoint. Returns: dict: a name:value dict """

    model_path = get_checkpoint_path(model_path)
    reader = tfv1.train.NewCheckpointReader(model_path)
    var_names = reader.get_variable_to_shape_map().keys()
    result = {}
    for n in var_names:
        result[n] = reader.get_tensor(n)
    return result