code: def add_nx(doctest_namespace):
      doctest_namespace["nx"] = networkx
      # TODO: remove the try-except block when we require numpy >= 2
      try:
          import numpy as np
  
          np.set_printoptions(legacy="1.21")
      except ImportError:
          pass
  
file_path: networkx/networkx/conftest.py
imports: import os
  import sys
  import warnings
  from importlib.metadata import entry_points
  import pytest
  import networkx
label_desc: Use image node_id 5 for calling a global function with example usage: add_nx(doctest_namespace) without return types