import collections


def convert_tuple(to_tuple, from_tuple):
    """Converts one namedtuple type to another."""
    from_dict = from_tuple._asdict()
    fields = collections.OrderedDict(
                            (key, from_dict[key]) for key in to_tuple._fields)
    return to_tuple(**fields)