code: def test_from_networkx_with_missing_layout(nx) -> None:
      G = nx.Graph()
      G.add_nodes_from([0, 1, 2])
      G.add_edges_from([[0, 1], [0, 2]])
  
      missing_fixed_layout = {0: [0, 1], 1: [-1, 0]}
  
      with pytest.warns(UserWarning):
          renderer = bpg.from_networkx(G, missing_fixed_layout)
          gl = renderer.layout_provider.graph_layout
          assert set(gl.keys()) == {0, 1}
          assert (
              renderer.layout_provider.graph_layout[0]
              == missing_fixed_layout[0]
          )
          assert (
              renderer.layout_provider.graph_layout[1]
              == missing_fixed_layout[1]
          )
  
file_path: bokeh/tests/unit/bokeh/plotting/test_graph.py
imports: from __future__ import annotations
  import pytest
  import numpy
  from numpy.testing import assert_allclose
  import bokeh.plotting.graph
label_desc: Use image node_id 8 for calling a global function with example usage: test_from_networkx_with_missing_layout(nx) without return types