code: def test_has_tasks():
      dsk = {
          "a": [1, 2, 3],
          "b": "a",
          "c": [1, (inc, 1)],
          "d": [(sum, "a")],
          "e": ["a", "b"],
          "f": [["a", "b"], 2, 3],
      }
      assert not has_tasks(dsk, dsk["a"])
      assert has_tasks(dsk, dsk["b"])
      assert has_tasks(dsk, dsk["c"])
      assert has_tasks(dsk, dsk["d"])
      assert has_tasks(dsk, dsk["e"])
      assert has_tasks(dsk, dsk["f"])
  
imports: from __future__ import annotations
  import pickle
  from collections import namedtuple
  import pytest
  from dask.core import flatten, get, get_dependencies, get_deps, getcycle, has_tasks, ishashable, iskey, istask, literal, preorder_traversal, quote, subs, validate_key
  from dask.utils_test import GetFunctionTestMixin, add, inc
label_desc: Use image node_id 7 for calling a global function with example usage: test_has_tasks() without return types