Returns the payer channel of a given transfer pair or None if it's not found

def get_payer_channel(
        channelidentifiers_to_channels: ChannelMap,
        transfer_pair: MediationPairState,
) -> Optional[NettingChannelState]:
    """ Returns the payer channel of a given transfer pair or None if it's not found """
    payer_channel_identifier = transfer_pair.payer_transfer.balance_proof.channel_identifier
    return channelidentifiers_to_channels.get(payer_channel_identifier)