def pick(d, *args):
    """
    Pick some keys on a given dictionary.

    :param d:       the dict
    :param args:    the keys to pick
    """
    res = {}
    getitem = d.getlist if hasattr(d, "getlist") else d.__getitem__
    for key in args:
        if key in d:
            res[key] = getitem(key)
    return res