<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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 -------- """

        # 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))]