code: def test_estimate_cpd_dirichlet(self):
      cpd_A = self.est1.estimate_cpd(
          "A", prior_type="dirichlet", pseudo_counts=[[0], [1]]
      )
      cpd_A_exp = TabularCPD(
          variable="A",
          variable_card=2,
          values=[[0.5], [0.5]],
          state_names={"A": [0, 1]},
      )
      self.assertEqual(cpd_A, cpd_A_exp)
  
      # also test passing pseudo_counts as np.array
      pseudo_counts = np.array([[0], [1]])
      cpd_A = self.est1.estimate_cpd(
          "A", prior_type="dirichlet", pseudo_counts=pseudo_counts
      )
      self.assertEqual(cpd_A, cpd_A_exp)
  
      cpd_B = self.est1.estimate_cpd(
          "B", prior_type="dirichlet", pseudo_counts=[[9], [3]]
      )
      cpd_B_exp = TabularCPD(
          "B", 2, [[11.0 / 15], [4.0 / 15]], state_names={"B": [0, 1]}
      )
      self.assertEqual(cpd_B, cpd_B_exp)
  
      cpd_C = self.est1.estimate_cpd(
          "C",
          prior_type="dirichlet",
          pseudo_counts=[[0.4, 0.4, 0.4, 0.4], [0.6, 0.6, 0.6, 0.6]],
      )
      cpd_C_exp = TabularCPD(
          "C",
          2,
          [[0.2, 0.2, 0.7, 0.4], [0.8, 0.8, 0.3, 0.6]],
          evidence=["A", "B"],
          evidence_card=[2, 2],
          state_names={"A": [0, 1], "B": [0, 1], "C": [0, 1]},
      )
      self.assertEqual(cpd_C, cpd_C_exp)
  
imports: import unittest
  import numpy
  import pandas
  from joblib.externals.loky import get_reusable_executor
  from pgmpy import config
  from pgmpy.estimators import BayesianEstimator
  from pgmpy.factors.discrete import TabularCPD
  from pgmpy.models import BayesianNetwork
label_desc: Use image node_id 3 for calling the TestBayesianEstimator obj's underlying member method code with example usage: obj.test_estimate_cpd_dirichlet() without return types