import collections


def to_ordered_dict(param_names, state):
    """Transforms list of state parts into collections.OrderedDict with given param names."""
    return collections.OrderedDict([(k, v) for k, v in zip(param_names, state)])