def METHOD_NAME(self, m):
    mtype = m.get_type()
    if mtype == 'HIGH_LATENCY2':
        mode_map = mavutil.mode_mapping_bynumber(m.type)
        if mode_map and m.custom_mode in mode_map:
            self.master.flightmode = mode_map[m.custom_mode]