code: def create_graph(
      layout_func,
      inspection_policy=None,
      selection_policy=None,
      **kwargs,
  ):
      plot = Plot(
          width=400,
          height=400,
          x_range=Range1d(-1.1, 1.1),
          y_range=Range1d(-1.1, 1.1),
      )
      graph_renderer = from_networkx(G, layout_func, **kwargs)
  
      graph_renderer.node_renderer.glyph = Scatter(
          size=15, fill_color=Spectral4[0]
      )
      graph_renderer.node_renderer.selection_glyph = Scatter(
          size=15, fill_color=Spectral4[2]
      )
      graph_renderer.node_renderer.hover_glyph = Scatter(
          size=15, fill_color=Spectral4[1]
      )
  
      graph_renderer.edge_renderer.glyph = MultiLine(
          line_color="#CCCCCC", line_alpha=0.8, line_width=5
      )
      graph_renderer.edge_renderer.selection_glyph = MultiLine(
          line_color=Spectral4[2], line_width=5
      )
      graph_renderer.edge_renderer.hover_glyph = MultiLine(
          line_color=Spectral4[1], line_width=5
      )
  
      if inspection_policy is not None:
          graph_renderer.inspection_policy = inspection_policy
      if selection_policy is not None:
          graph_renderer.selection_policy = selection_policy
  
      plot.renderers.append(graph_renderer)
  
      return plot
  
imports: import networkx
  from bokeh.io import show
  from bokeh.models import BoxSelectTool, Column, EdgesAndLinkedNodes, HoverTool, MultiLine, NodesAndAdjacentNodes, NodesAndLinkedEdges, Plot, Range1d, Row, Scatter, TapTool
  from bokeh.palettes import Spectral4
  from bokeh.plotting import from_networkx
label_desc: Use image node_id 1 for calling a global function with example usage: create_graph(layout_func, inspection_policy, selection_policy) and returns: plot