docstr: If the degree is zero, zero edges are generated.
  We test this is true for intra edges (ending in 'lag0') and inter edges
docstr_tok: ["If","the","degree","is","zero",",","zero","edges","are","generated",".","We","test","this","is","true","for","intra","edges","(","ending","in","'lag0","'",")","and","inter","edges"]
code: def test_degree_zero_implies_no_edges(self):
      """If the degree is zero, zero edges are generated.
      We test this is true for intra edges (ending in 'lag0') and inter edges
      """
      g = generate_structure_dynamic(15, 3, 0, 4)  # No intra edges
      lags = [
          (u.split("_lag")[1], v.split("_lag")[1]) for u, v in g.edges
      ]
      assert np.all([el[0] != "0" for el in lags])
      g = generate_structure_dynamic(15, 3, 4, 0)
      lags = [
          (u.split("_lag")[1], v.split("_lag")[1]) for u, v in g.edges
      ]
      assert np.all(
          [el == ("0", "0") for el in lags]
      )  # only Intra edges
      g = generate_structure_dynamic(15, 3, 0, 0)  # no edges
      assert len(g.edges) == 0
  
imports: import re
  import string
  from itertools import product
  import numpy
  import pandas
  import pytest
  from scipy import stats
  from sklearn.gaussian_process.kernels import RBF
  from causalnex.structure import StructureModel
  from causalnex.structure.data_generators import gen_stationary_dyn_net_and_df, generate_binary_data, generate_binary_dataframe, generate_categorical_dataframe, generate_continuous_data, generate_continuous_dataframe, generate_count_dataframe, generate_dataframe_dynamic, generate_structure, generate_structure_dynamic
  from tests.structure.data_generators.test_core import calculate_proba
label_desc: Use image node_id 3 for calling the TestGenerateStructureDynamic obj's underlying member method code with example usage: obj.test_degree_zero_implies_no_edges() without return types