code: def test_bfs_layers(self):
      expected = {
          0: [0],
          1: [1],
          2: [2, 3],
          3: [4],
      }
      assert (
          dict(enumerate(nx.bfs_layers(self.G, sources=[0])))
          == expected
      )
      assert (
          dict(enumerate(nx.bfs_layers(self.G, sources=0))) == expected
      )
  
imports: from functools import partial
  import pytest
  import networkx
label_desc: Use image node_id 9 for calling the TestBFS obj's underlying member method code with example usage: obj.test_bfs_layers() without return types