code: def get_correct_cpds(
      df: pd.DataFrame,
      sm: StructureModel,
      node_states: Dict,
      true_lv_values: np.array,
  ) -> pd.DataFrame:
      """
      Get the cpds obtained if complete data was provided (no latent variable)
  
      Args:
          df: Input dataset
          sm: Structure model
          node_states: Dictionary of node states
          true_lv_values: True values of latent variable
  
      Returns:
          Ground-truth CPDs
      """
      data = df.copy()
      data["z"] = true_lv_values
      bn = BayesianNetwork(sm)
      bn.fit_node_states(states_to_df(node_states))
      bn.fit_cpds(data)
      return bn.cpds
  
imports: from collections import Counter
  from typing import Any, AnyStr, Dict, Iterable, List, Set, Tuple, Union
  import numpy
  import pandas
  import pytest
  from causalnex.estimator.em import EMSingleLatentVariable
  from causalnex.network import BayesianNetwork
  from causalnex.structure.structuremodel import StructureModel
  from causalnex.utils.data_utils import states_to_df
label_desc: Use image node_id 3 for calling a global function with example usage: get_correct_cpds(df, sm, node_states, true_lv_values) and returns: bn