<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def convert_pro_to_hyp(pro):
 """Converts a pro residue to a hydroxypro residue. All metadata associated with the original pro will be lost i.e. tags. As a consequence, it is advisable to relabel all atoms in the structure in order to make them contiguous. Parameters pro: ampal.Residue The proline residue to be mutated to hydroxyproline. Examples -------- We can create a collagen model using isambard and convert every third residue to hydroxyproline: ['GPXGPXGPXGPXGPXGPXGPX', 'GPXGPXGPXGPXGPXGPXGPX', 'GPXGPXGPXGPXGPXGPXGPX'] """

    with open(str(REF_PATH / 'hydroxyproline_ref_1bkv_0_6.pickle'), 'rb') as inf:
        hyp_ref = pickle.load(inf)
    align_nab(hyp_ref, pro)
    to_remove = ['CB', 'CG', 'CD']
    for (label, atom) in pro.atoms.items():
        if atom.element == 'H':
            to_remove.append(label)
    for label in to_remove:
        del pro.atoms[label]
    for key, val in hyp_ref.atoms.items():
        if key not in pro.atoms.keys():
            pro.atoms[key] = val
    pro.mol_code = 'HYP'
    pro.mol_letter = 'X'
    pro.is_hetero = True
    pro.tags = {}
    pro.states = {'A': pro.atoms}
    pro.active_state = 'A'
    for atom in pro.get_atoms():
        atom.ampal_parent = pro
        atom.tags = {'bfactor': 1.0, 'charge': ' ',
                     'occupancy': 1.0, 'state': 'A'}
    return