@classmethod
def get_filename_key_regex(cls):
    """Return the filename key regex."""
    try:
        return cls.filename_key_regex
    except AttributeError:
        try:
            return cls.filename_key
        except AttributeError:
            raise NotImplementedError(
                'SizedImage subclasses must define a `filename_key_regex` attribute or a `filename_key` attribute or override the `get_filename_key_regex` class method.'
                )
