docs: def get_cpds(self, node=None, time_slice=0):
          """
          Returns the CPDs that have been associated with the network.
  
          Parameters
          ----------
          node: tuple (node_name, time_slice)
              The node should be in the following form (node_name, time_slice).
              Here, node_name is the node that is inserted while the time_slice is
              an integer value, which denotes the index of the time_slice that the
              node belongs to.
  
          time_slice: int
              The time_slice should be a positive integer greater than or equal to zero.
  
          Examples
          --------
          >>> from pgmpy.models import DynamicBayesianNetwork as DBN
          >>> from pgmpy.factors.discrete import TabularCPD
          >>> dbn = DBN()
          >>> dbn.add_edges_from([(('D',0),('G',0)),(('I',0),('G',0)),(('D',0),('D',1)),(('I',0),('I',1))])
          >>> grade_cpd =  TabularCPD(('G',0), 3, [[0.3,0.05,0.9,0.5],
          ...                                      [0.4,0.25,0.8,0.03],
          ...                                      [0.3,0.7,0.02,0.2]], [('I', 0),('D', 0)],[2,2])
          >>> dbn.add_cpds(grade_cpd)
          >>> dbn.get_cpds()
          """
          # TODO: fix bugs in this
          if node:
              if node not in super(DynamicBayesianNetwork, self).nodes():
                  raise ValueError('Node not present in the model.')
              else:
                  for cpd in self.cpds:
                      if cpd.variable == node:
                          return cpd
          else:
              return [cpd for cpd in self.cpds if set(list(cpd.variables)).issubset(self.get_slice_nodes(time_slice))]