def METHOD_NAME(self, named_trajectory):
    new_trajectory = []
    for entry in named_trajectory:
        new_entry = deepcopy(entry)
        if 'name' in new_entry:
            if new_entry['name'] in self._dictionary:
                new_entry['joint_angles'] = self._dictionary[new_entry['name']]
                new_entry.pop('name')
            else:
                rospy.logwarn(f"Entry named {new_entry['name']} not present in dictionary. Not replacing.")
        new_trajectory.append(new_entry)
    return new_trajectory