code: def generate_continuous_data(
      sm: nx.DiGraph,
      n_samples: int,
      distribution: str = "gaussian",
      noise_scale: float = 1.0,
      intercept: bool = False,
      seed: int = None,
      kernel: Optional[Kernel] = None,
  ) -> np.ndarray:
      """
      Simulate samples from SEM with specified type of noise.
      The order of the columns on the returned array is the one provided by `sm.nodes`
  
      Args:
          sm: A DAG in form of a networkx or StructureModel. Does not require weights.
          n_samples: The number of rows/observations to sample.
          kernel: A kernel from sklearn.gaussian_process.kernels like RBF(1) or
              Matern(1) or any combinations thereof. The kernels are used to
              create the latent variable for the binary / categorical variables
              and are directly used for continuous variables.
          distribution: The type of distribution to use for the noise
              of a variable. Options: 'gaussian'/'normal' (alias), 'student-t',
              'exponential', 'gumbel'.
          noise_scale: The standard deviation of the noise.
          intercept: Whether to use an intercept for each feature.
          seed: Random state
      Returns:
          x_mat: [n_samples,d_nodes] sample matrix
      Raises:
          ValueError: if distribution isn't gaussian/normal/student-t/exponential/gumbel
      """
      if kernel is None:
          df = sem_generator(
              graph=sm,
              default_type="continuous",
              n_samples=n_samples,
              distributions={"continuous": distribution},
              noise_std=noise_scale,
              intercept=intercept,
              seed=seed,
          )
      else:
          df = nonlinear_sem_generator(
              graph=sm,
              kernel=kernel,
              default_type="continuous",
              n_samples=n_samples,
              distributions={"continuous": distribution},
              noise_std=noise_scale,
              seed=seed,
          )
      return df[list(sm.nodes())].values
  
file_path: causalnex/causalnex/structure/data_generators/wrappers.py
imports: import warnings
  from typing import List, Optional, Tuple
  import networkx
  import numpy
  import pandas
  from scipy.sparse import csr_matrix
  from sklearn.gaussian_process.kernels import Kernel
  from causalnex.structure.data_generators import generate_structure, nonlinear_sem_generator, sem_generator
  from causalnex.structure.structuremodel import StructureModel
label_desc: Use image node_id 1 for calling a global function with example usage: generate_continuous_data(sm, n_samples, distribution, noise_scale, intercept, seed, kernel) and returns: df