code: def nx() -> (
      ModuleType | None
  ):  # XXX: should be networkx | None, but not supported
      """A PyTest fixture that will automatically skip a test if networkx is
      not installed.
  
      """
      nx = import_optional("networkx")
      if nx is None:
          pytest.skip("networkx is not installed")
      return nx
  
imports: from __future__ import annotations
  import logging
  from types import ModuleType
  import pytest
  from bokeh.util.dependencies import import_optional
label_desc: Use image node_id 1 for calling a global function with example usage: nx() and returns: nx