def _invalid(message, location=None):
    ' A helper for validating policies. '
    if (location is None):
        raise PolicyValidationError(f'{message}.')
    raise PolicyValidationError(f'{message} in {location}.')
A helper for validating policies.
def _invalid(message, location=None):
    '  '
    if (location is None):
        raise PolicyValidationError(f'{message}.')
    raise PolicyValidationError(f'{message} in {location}.')