def _remove_sensitive_info(obj, patterns_to_filter):
    '\n    Filter known sensitive info\n    '
    if isinstance(obj, dict):
        obj = {key: _remove_sensitive_info(value, patterns_to_filter) for (key, value) in obj.items() if (not any(((patt in key) for patt in patterns_to_filter)))}
    elif isinstance(obj, list):
        obj = [_remove_sensitive_info(item, patterns_to_filter) for item in obj]
    return obj
Filter known sensitive info
def _remove_sensitive_info(obj, patterns_to_filter):
    '\n    \n    '
    if isinstance(obj, dict):
        obj = {key: _remove_sensitive_info(value, patterns_to_filter) for (key, value) in obj.items() if (not any(((patt in key) for patt in patterns_to_filter)))}
    elif isinstance(obj, list):
        obj = [_remove_sensitive_info(item, patterns_to_filter) for item in obj]
    return obj