def dict_from_keys(adict, keys):
    """ Selects a subset of a dictionary with a list of keys.

    :param adict: A dictionary.
    :param keys: A list of keys.

    :returns: A subset of the input dictionary.

    >>> from dautils import collect
    >>> adict = {'a.latex': 1, 'b.latex': 2, 'c': 3}
    >>> collect.dict_from_keys(adict, ['b.latex', 'a.latex'])
    {'a.latex': 1, 'b.latex': 2}
    """
    return {k: adict[k] for k in keys}