def find_offset(offset, mapping):
    """Find the offset tuple for a single offset."""
    if isinstance(offset, tuple):
        return offset
    for token_offset, position in mapping:
        if offset <= token_offset:
            break
    return position[0], position[1] + offset - token_offset
