This whole block would be better written as:

    context = kw.pop('context', self.context)