code: def test_bipartite_degrees(self):
      G = nx.path_graph(5)
      X = {1, 3}
      Y = {0, 2, 4}
      u, d = bipartite.degrees(G, Y)
      assert dict(u) == {1: 2, 3: 2}
      assert dict(d) == {0: 1, 2: 2, 4: 1}
  
file_path: networkx/networkx/algorithms/bipartite/tests/test_basic.py
imports: import pytest
  import networkx
  from networkx.algorithms import bipartite
label_desc: Use image node_id 11 for calling the TestBipartiteBasic obj's underlying member method code with example usage: obj.test_bipartite_degrees() without return types