def METHOD_NAME(pubkey: bytes) -> Tuple[int, Any]:
    """Convert a public key in sec binary format to a public pair."""
    x = string_to_number(pubkey[1:33])
    sec0 = pubkey[:1]
    if sec0 not in (b"\2", b"\3"):
        raise ValueError("Compressed pubkey expected")
    def public_pair_for_x(generator, x: int, is_even: bool) -> Tuple[int, Any]:
        curve = generator.curve()
        p = curve.p()
        alpha = (pow(x, 3, p) + curve.a() * x + curve.b()) % p
        beta = ecdsa.numbertheory.square_root_mod_prime(alpha, p)
        if is_even == bool(beta & 1):
            return (x, p - beta)
        return (x, beta)
    return public_pair_for_x(
        ecdsa.ecdsa.generator_secp256k1, x, is_even=(sec0 == b"\2")
    )