def get_instance_fields(instance):
    """Return parameter attributs managed by django-algolia

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

        >>> class AnotherGoodClass(object): ALGOLIA_INDEX_FIELDS = ('other', 'attrs')
        >>> another_good = AnotherGoodClass()
        >>> get_instance_fields(AnotherGoodClass)
        ('other', 'attrs')
        >>> get_instance_fields(another_good)
        ('other', 'attrs')

        >>> random_stuff = object()
        >>> get_instance_fields(random_stuff)
        []

        >>> get_instance_fields()
        Traceback (most recent call last):
        TypeError: get_instance_fields() takes exactly 1 argument (0 given)
    """
    return getattr(instance, 'ALGOLIA_INDEX_FIELDS', [])