code: def test_deprecations():
      G = nx.Graph([(1, 2)])
      generic_bfs = nx.breadth_first_search.generic_bfs_edges
      with pytest.deprecated_call():
          list(generic_bfs(G, source=1, sort_neighbors=sorted))
      with pytest.deprecated_call():
          list(
              generic_bfs(
                  G,
                  source=1,
                  neighbors=G.neighbors,
                  sort_neighbors=sorted,
              )
          )
  
imports: from functools import partial
  import pytest
  import networkx
label_desc: Use image node_id 1 for calling a global function with example usage: test_deprecations() without return types