code: def test_imap_unordered(self):
      self.minimum_engines(4)
      view = self.view
  
      source = count()
  
      def yield_up_and_down(n):
          for i in range(n):
              if i % 4 == 0:
                  yield 1 + i / 100
              else:
                  yield i / 100
  
      def task(t):
          import time
  
          time.sleep(t)
          return t
  
      gen = view.imap(
          task, yield_up_and_down(10), max_outstanding=2, ordered=False
      )
      results = []
      for i, t in enumerate(gen):
          results.append(t)
          if i >= 2:
              break
  
      # stop consuming
      gen.cancel()
  
      assert len(results) == 3
      print(results)
      assert all([r < 1 for r in results])
  
      # wait
      self.client.wait(timeout=self.timeout)
      # verify that max_outstanding wasn't exceeded
      assert 4 <= len(self.view.history) <= 6
  
imports: import time
  from itertools import count
  import pytest
  import ipyparallel
  from ipyparallel import error
  from .clienttest import ClusterTestCase, crash, raises_remote
label_desc: Use image node_id 12 for calling the TestLoadBalancedView obj's underlying member method code with example usage: obj.test_imap_unordered() and returns: t