code: def cancel_current_route(
          payment_state: InitiatorPaymentState,
          initiator_state: InitiatorTransferState,
  ) -> List[Event]:
      
      assert can_cancel(initiator_state), 'Cannot cancel a route after the secret is revealed'
  
      transfer_description = initiator_state.transfer_description
  
      payment_state.cancelled_channels.append(initiator_state.channel_identifier)
  
      return events_for_cancel_current_route(transfer_description)
docs: Cancel current route.
  
      This allows a new route to be tried.