code: def test_is_regular_empty_graph_raises():
      G = nx.Graph()
      with pytest.raises(
          nx.NetworkXPointlessConcept, match="Graph has no nodes"
      ):
          nx.is_regular(G)
  
imports: import pytest
  import networkx
  import networkx
  import networkx.algorithms.regular
  import networkx.generators
label_desc: Use image node_id 1 for calling a global function with example usage: test_is_regular_empty_graph_raises() without return types