'Check the external process calls for dibbler are expected
in the case of multiple pd-enabled router ports, the exact sequence
of these calls are not deterministic. It\'s known, though, that each
external_process call is followed with either an enable() or disable()'

def _pd_assert_dibbler_calls(self, expected, actual):

    num_ext_calls = (len(expected) // 2)
    expected_ext_calls = []
    actual_ext_calls = []
    expected_action_calls = []
    actual_action_calls = []
    for c in range(num_ext_calls):
        expected_ext_calls.append(expected[(c * 2)])
        actual_ext_calls.append(actual[(c * 2)])
        expected_action_calls.append(expected[((c * 2) + 1)])
        actual_action_calls.append(actual[((c * 2) + 1)])
    self.assertEqual(expected_action_calls, actual_action_calls)
    for exp in expected_ext_calls:
        for act in actual_ext_calls:
            if (exp == act):
                break
        else:
            msg = 'Unexpected    dibbler    external    process    call.'
            self.fail(msg)
