code: def test_is_regular4(self):
      g = nx.DiGraph()
      g.add_edges_from([(0, 1), (1, 2), (2, 0)])
      assert reg.is_regular(g)
  
imports: import pytest
  import networkx
  import networkx
  import networkx.algorithms.regular
  import networkx.generators
label_desc: Use image node_id 4 for calling the TestIsRegular obj's underlying member method code with example usage: obj.test_is_regular4() without return types