'Returns dict to store on session for partial pipeline.'

def to_session_dict(self, next_idx, *args, **kwargs):

    return {'next': next_idx, 'backend': self.AUTH_BACKEND.name, 'args': tuple(map(model_to_ctype, args)), 'kwargs': dict(((key, model_to_ctype(val)) for (key, val) in six.iteritems(kwargs)))}
