def filter_dict_object(data, *keys, **kwargs):
    """
    获取字典中想要/不要的键, 取决于kwargs参数
    :param data: 字典对象
    :param keys: 需要保留的键
    :param kwargs: 关键字参数
    :return 过滤掉的字典内容
    """
    if not isinstance(data, dict):
        raise TypeError('expected dict type, but got {}'.format(type(data)))
    result = dict()
    keep = False
    if 'keep' in kwargs and kwargs.pop('keep'):
        keep = True
    all_keys = list(data.keys())
    for key in all_keys:
        if keep:
            if key not in keys:
                result[key] = data.pop(key)
        elif key in keys:
            result[key] = data.pop(key)
    return result
