def METHOD_NAME(
    credentials: HapCredentials, connection: HttpConnection
) -> PairVerifyProcedure:
    """Return procedure object used for Pair-Verify."""
    _LOGGER.debug(
        "Setting up new AirPlay Pair-Verify procedure with type %s", credentials.type
    )
    if credentials.type == AuthenticationType.Null:
        return NullPairVerifyProcedure()
    if credentials.type == AuthenticationType.Legacy:
        legacy_srp = LegacySRPAuthHandler(credentials)
        legacy_srp.initialize()
        return AirPlayLegacyPairVerifyProcedure(connection, legacy_srp)
    srp = SRPAuthHandler()
    srp.initialize()
    if credentials.type == AuthenticationType.HAP:
        return AirPlayHapPairVerifyProcedure(connection, srp, credentials)
    return AirPlayHapTransientPairVerifyProcedure(connection, srp)