def is_algolia_managed(instance):
    """Check if the specified parameter is managed by django-algolia

    Tests:
        >>> class ManagedClass(object): ALGOLIA_INDEX_FIELDS = ['some', 'fields']
        >>> managed_instance = ManagedClass()
        >>> is_algolia_managed(ManagedClass)
        True
        >>> is_algolia_managed(managed_instance)
        True

        >>> random_stuff = object()
        >>> is_algolia_managed(random_stuff)
        False

        >>> is_algolia_managed()
        Traceback (most recent call last):
        TypeError: is_algolia_managed() takes exactly 1 argument (0 given)
    """
    return hasattr(instance, 'ALGOLIA_INDEX_FIELDS')