def filter_only(keep_list, filter_list):
    """Filter out items in an iterable not in the keep_list.

    :param keep_list: list of key names to keep.
    :type: list of str
    :param filter_list: iterable to filter.
    :type: list or dict
    """
    return list(
        filter(
            lambda key: key in keep_list, filter_list
        )
    )