<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_view_model(cls):
 """ Get the model to use in the filter_class by inspecting the queryset or by using a declared auto_filters_model """

    msg = 'When using get_queryset you must set a auto_filters_model field in the viewset'
    if cls.queryset is not None:
        return cls.queryset.model
    else:
        assert hasattr(cls, 'auto_filters_model'), msg
        return cls.auto_filters_model