Verify that serializer is a :py:class:`~rest_framework_fine_permissions.serializers.ModelPermissionsSerializer`.

def inherits_modelpermissions_serializer(cls):
    """ Verify that serializer is a :py:class:`~rest_framework_fine_permissions.serializers.ModelPermissionsSerializer`. """
    def is_modelperms():
        return 'ModelPermissionsSerializer' in [
            ser.__name__ for ser in cls.__bases__
        ]
    is_serializer = type(cls).__name__ == 'SerializerMetaclass'

    return inspect.isclass(cls) and is_serializer and is_modelperms()