'Return (a // b, a % b).
>>> ExtendedContext.divmod(Decimal(8), Decimal(3))
(Decimal(\'2\'), Decimal(\'2\'))
>>> ExtendedContext.divmod(Decimal(8), Decimal(4))
(Decimal(\'2\'), Decimal(\'0\'))
>>> ExtendedContext.divmod(8, 4)
(Decimal(\'2\'), Decimal(\'0\'))
>>> ExtendedContext.divmod(Decimal(8), 4)
(Decimal(\'2\'), Decimal(\'0\'))
>>> ExtendedContext.divmod(8, Decimal(4))
(Decimal(\'2\'), Decimal(\'0\'))'

def divmod(self, a, b):

    a = _convert_other(a, raiseit=True)
    r = a.__divmod__(b, context=self)
    if (r is NotImplemented):
        raise TypeError(('Unable    to    convert    %s    to    Decimal' % b))
    else:
        return r
