code: def test_order_cycle():
      with pytest.raises(RuntimeError, match="Cycle detected"):
          dask.get({"a": (f, "a")}, "a")  # we encounter this in `get`
      with pytest.raises(RuntimeError, match="Cycle detected"):
          order({"a": (f, "a")})  # trivial self-loop
      with pytest.raises(RuntimeError, match="Cycle detected"):
          order({("a", 0): (f, ("a", 0))})  # non-string
      with pytest.raises(RuntimeError, match="Cycle detected"):
          order(
              {"a": (f, "b"), "b": (f, "c"), "c": (f, "a")}
          )  # non-trivial loop
      with pytest.raises(RuntimeError, match="Cycle detected"):
          order(
              {"a": (f, "b"), "b": (f, "c"), "c": (f, "a", "d"), "d": 1}
          )
      with pytest.raises(RuntimeError, match="Cycle detected"):
          order(
              {
                  "a": (f, "b"),
                  "b": (f, "c"),
                  "c": (f, "a", "d"),
                  "d": (f, "b"),
              }
          )
  
imports: from __future__ import annotations
  import inspect
  import pytest
  import dask
  from dask import delayed
  from dask.base import collections_to_dsk, key_split, visualize_dsk
  from dask.core import get_deps
  from dask.order import _connecting_to_roots, diagnostics, ndependencies, order
  from dask.utils_test import add, inc
label_desc: Use image node_id 28 for calling a global function with example usage: test_order_cycle() without return types