def remove_rev_dep(stix_objects):
    """Remove any revoked or deprecated objects from queries made to the data source"""
    # Note we use .get() because the property may not be present in the JSON data. The default is False
    # if the property is not set.
    return list(
        filter(
            lambda x: x.get('x_mitre_deprecated', False) is False and x.get('revoked', False) is False,
            stix_objects
        )
    )