code: def test_order_with_equal_dependents(abcde):
      """From https://github.com/dask/dask/issues/5859#issuecomment-608422198.
  
      See the visualization of `(maxima, argmax)` example from the above comment.
  
      This DAG has enough structure to exercise more parts of `order`
      """
      a, b, c, d, e = abcde
      dsk = {}
      abc = [a, b, c, d]
      for x in abc:
          dsk.update(
              {
                  (x, 0): 0,
                  (x, 1): (f, (x, 0)),
                  (x, 2, 0): (f, (x, 0)),
                  (x, 2, 1): (f, (x, 1)),
              }
          )
          for i, y in enumerate(abc):
              dsk.update(
                  {
                      (x, 3, i): (
                          f,
                          (x, 2, 0),
                          (y, 2, 1),
                      ),  # cross x and y
                      (x, 4, i): (f, (x, 3, i)),
                      (x, 5, i, 0): (f, (x, 4, i)),
                      (x, 5, i, 1): (f, (x, 4, i)),
                      (x, 6, i, 0): (f, (x, 5, i, 0)),
                      (x, 6, i, 1): (f, (x, 5, i, 1)),
                  }
              )
      o = order(dsk)
      total = 0
      for x in abc:
          for i in range(len(abc)):
              val = o[(x, 6, i, 1)] - o[(x, 6, i, 0)]
              assert val > 0  # ideally, val == 2
              total += val
      assert total <= 32  # ideally, this should be 2 * 16 = 32
  
      # Add one to the end of the nine bundles
      dsk2 = dict(dsk)
      for x in abc:
          for i in range(len(abc)):
              dsk2[(x, 7, i, 0)] = (f, (x, 6, i, 0))
      o = order(dsk2)
      total = 0
      for x in abc:
          for i in range(len(abc)):
              val = o[(x, 7, i, 0)] - o[(x, 6, i, 1)]
              assert val > 0  # ideally, val == 3
              total += val
      assert total <= 165  # ideally, this should be 3 * 16 == 48
  
      # Remove one from each of the nine bundles
      dsk3 = dict(dsk)
      for x in abc:
          for i in range(len(abc)):
              del dsk3[(x, 6, i, 1)]
      o = order(dsk3)
      total = 0
      for x in abc:
          for i in range(len(abc)):
              val = o[(x, 6, i, 0)] - o[(x, 5, i, 1)]
              assert val > 0  # ideally, val == 2
              total += val
      assert total <= 119  # ideally, this should be 2 * 16 == 32
  
      # Remove another one from each of the nine bundles
      dsk4 = dict(dsk3)
      for x in abc:
          for i in range(len(abc)):
              del dsk4[(x, 6, i, 0)]
      o = order(dsk4)
      total = 0
      for x in abc:
          for i in range(len(abc)):
              assert o[(x, 5, i, 1)] - o[(x, 5, i, 0)] == 1
  
imports: import pytest
  from flash.core.serve.dag.order import ndependencies, order
  from flash.core.serve.dag.task import get, get_deps
  from flash.core.serve.dag.utils_test import add, inc
  from flash.core.utilities.imports import _TOPIC_SERVE_AVAILABLE
label_desc: Use image node_id 30 for calling a global function with example usage: test_order_with_equal_dependents(abcde) without return types