code: def test_is_k_regular1(self):
      g = gen.cycle_graph(4)
      assert reg.is_k_regular(g, 2)
      assert not reg.is_k_regular(g, 3)
  
imports: import pytest
  import networkx
  import networkx
  import networkx.algorithms.regular
  import networkx.generators
label_desc: Use image node_id 1 for calling the TestIsKRegular obj's underlying member method code with example usage: obj.test_is_k_regular1() without return types