code: def test_string_ordering():
      """Prefer ordering tasks by name first"""
      dsk = {("a", 1): (f,), ("a", 2): (f,), ("a", 3): (f,)}
      o = order(dsk)
      assert_topological_sort(dsk, o)
      assert o == {("a", 1): 0, ("a", 2): 1, ("a", 3): 2} or o == {
          ("a", 1): 2,
          ("a", 2): 1,
          ("a", 3): 0,
      }
  
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 20 for calling a global function with example usage: test_string_ordering() without return types