def _check_subscriber_for_email_address(subscriber_model, message):
    """Ensure the custom model has an ``email`` field or property."""

    if ("email" not in subscriber_model._meta.get_all_field_names()) and not hasattr(subscriber_model, 'email'):
        raise ImproperlyConfigured(message)
dataset/ETHPy150Open pydanny/dj-stripe/djstripe/settings.py/_check_subscriber_for_email_address/original