add get_cpd method to TabularCPD