code: def test_full_rary_tree(self):
      r = 2
      n = 9
      t = nx.full_rary_tree(r, n)
      assert t.order() == n
      assert nx.is_connected(t)
      dh = nx.degree_histogram(t)
      assert dh[0] == 0  # no nodes of 0
      assert dh[1] == 5  # nodes of degree 1 are leaves
      assert dh[r] == 1  # root is degree r
      assert dh[r + 1] == 9 - 5 - 1  # everyone else is degree r+1
      assert len(dh) == r + 2
  
imports: import itertools
  import typing
  import pytest
  import networkx
  from networkx.algorithms.isomorphism.isomorph import graph_could_be_isomorphic
  from networkx.utils import edges_equal, nodes_equal
label_desc: Use image node_id 4 for calling the TestGeneratorClassic obj's underlying member method code with example usage: obj.test_full_rary_tree() without return types