'Check if the provided filter is valid.
This inspects all definitions contained within the filter.
Args:
user_filter_json(dict): The filter
Raises:
SynapseError: If the filter is not valid.'

def check_valid_filter(self, user_filter_json):

    try:
        jsonschema.validate(user_filter_json, USER_FILTER_SCHEMA, format_checker=FormatChecker())
    except jsonschema.ValidationError as e:
        raise SynapseError(400, e.message)
