def qs_and_collection(self, qs):
        if hasattr(qs, 'model'):
            return (qs, self.get_collection(qs.model))
        elif isinstance(qs, (list, tuple)):
            return (qs[0], self.get_col_by_name(qs[1]))
        else:
            raise TypeError('Invalid query spec: %r' % qs)
Return (qs, collection) from qs (which may be a tuple).
dataset/ETHPy150Open django-ddp/django-ddp/dddp/api.py/DDP.qs_and_collection