docstr: both intra- and iter-slice nodes should be in the structure
docstr_tok: ["both","intra-","and","iter-slice","nodes","should","be","in","the","structure"]
code: def test_all_nodes_in_structure(
      self, num_nodes, p, degree_intra, degree_inter
  ):
      """both intra- and iter-slice nodes should be in the structure"""
      g = generate_structure_dynamic(
          num_nodes, p, degree_intra, degree_inter
      )
      assert np.all(
          [
              f"{var}_lag{l_val}" in g.nodes
              for l_val in range(p + 1)
              for var in range(num_nodes)
          ]
      )
  
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 1 for calling the TestGenerateStructureDynamic obj's underlying member method code with example usage: obj.test_all_nodes_in_structure(num_nodes, p, degree_intra, degree_inter) without return types