code: def get_deps(
      dsk: Graph,
  ) -> tuple[dict[Key, set[Key]], dict[Key, set[Key]]]:
      """Get dependencies and dependents from dask dask graph
  
      >>> inc = lambda x: x + 1
      >>> dsk = {'a': 1, 'b': (inc, 'a'), 'c': (inc, 'b')}
      >>> dependencies, dependents = get_deps(dsk)
      >>> dependencies
      {'a': set(), 'b': {'a'}, 'c': {'b'}}
      >>> dependents  # doctest: +SKIP
      {'a': {'b'}, 'b': {'c'}, 'c': set()}
      """
      dependencies = {
          k: get_dependencies(dsk, task=v) for k, v in dsk.items()
      }
      dependents = reverse_dict(dependencies)
      return dependencies, dependents
  
imports: from __future__ import annotations
  from collections import defaultdict
  from collections.abc import Collection, Iterable, Mapping
  from typing import Any, Literal, TypeVar, cast, overload
  from dask.typing import Graph, Key, NoDefault, no_default
label_desc: Use image node_id 14 for calling a global function with example usage: get_deps(dsk) and returns: dependencies,  dependents