def get_deps(dsk):
    """Get dependencies and dependents from task graph.

    Examples
    --------
    >>> from flash.core.serve.dag.utils_test import inc
    >>> dsk = {'a': 1, 'b': (inc, 'a'), 'c': (inc, 'b')}
    >>> dependencies, dependents = get_deps(dsk)
    >>> dependencies
    {'a': set(), 'b': {'a'}, 'c': {'b'}}
    >>> dict(dependents)
    {'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
Get dependencies and dependents from task graph.

    Examples
    --------
    >>> from flash.core.serve.dag.utils_test import inc
    >>> dsk = {'a': 1, 'b': (inc, 'a'), 'c': (inc, 'b')}
    >>> dependencies, dependents = get_deps(dsk)
    >>> dependencies
    {'a': set(), 'b': {'a'}, 'c': {'b'}}
    >>> dict(dependents)
    {'a': {'b'}, 'b': {'c'}, 'c': set()}

    
src/flash/core/serve/dag/task.py