docs: def add_cpds(self, *cpds):
          """
          Add CPD (Conditional Probability Distribution) to the Bayesian Model.
  
          Parameters
          ----------
          cpds  :  list, set, tuple (array-like)
              List of CPDs which will be associated with the model
  
          EXAMPLE
          -------
          >>> from pgmpy.models import BayesianModel
          >>> from pgmpy.factors.discrete.CPD import TabularCPD
          >>> student = BayesianModel([('diff', 'grades'), ('intel', 'grades')])
          >>> grades_cpd = TabularCPD('grades', 3, [[0.1,0.1,0.1,0.1,0.1,0.1],
          ...                                       [0.1,0.1,0.1,0.1,0.1,0.1],
          ...                                       [0.8,0.8,0.8,0.8,0.8,0.8]],
          ...                         evidence=['diff', 'intel'], evidence_card=[2, 3])
          >>> student.add_cpds(grades_cpd)
  
          +------+-----------------------+---------------------+
          |diff: |          easy         |         hard        |
          +------+------+------+---------+------+------+-------+
          |intel:| dumb |  avg |  smart  | dumb | avg  | smart |
          +------+------+------+---------+------+------+-------+
          |gradeA| 0.1  | 0.1  |   0.1   |  0.1 |  0.1 |   0.1 |
          +------+------+------+---------+------+------+-------+
          |gradeB| 0.1  | 0.1  |   0.1   |  0.1 |  0.1 |   0.1 |
          +------+------+------+---------+------+------+-------+
          |gradeC| 0.8  | 0.8  |   0.8   |  0.8 |  0.8 |   0.8 |
          +------+------+------+---------+------+------+-------+
          """
          for cpd in cpds:
              if not isinstance(cpd, (TabularCPD, ContinuousFactor)):
                  raise ValueError('Only TabularCPD or ContinuousFactor can be added.')
  
              if set(cpd.scope()) - set(cpd.scope()).intersection(
                      set(self.nodes())):
                  raise ValueError('CPD defined on variable not in the model', cpd)
  
              for prev_cpd_index in range(len(self.cpds)):
                  if self.cpds[prev_cpd_index].variable == cpd.variable:
                      logging.warning("Replacing existing CPD for {var}".format(var=cpd.variable))
                      self.cpds[prev_cpd_index] = cpd
                      break
              else:
                  self.cpds.append(cpd)