<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def cost(self, node):
 """ The cost of a eliminating a node is the product of weights, domain cardinality, of its neighbors. """

        return np.prod([self.bayesian_model.get_cardinality(neig_node) for neig_node in
                        self.moralized_model.neighbors(node)])