def divmod(x, y, context=None):
    """
    Return the pair (floordiv(x, y, context), mod(x, y, context)).

    Semantics for negative inputs match those of Python's divmod function.

    """
    return floordiv(x, y, context=context), mod(x, y, context=context)