def probability_table(self, state_from):
        """Return a dict of {state_to : probability, ...}.
        Returns empty dict if state_from unknown."""
        ret_val = {}
        try:
            counter = self._pairs[state_from]
            total = float(sum(counter.values()))
            ret_val = {k : v / total for k, v, in counter.items()}
        except KeyError:
            pass
        return ret_val
dataset/ETHPy150Open manahl/PythonTrainingExercises/Advanced/RomeoAndJuliet/solution/MarkovChain.py/MarkovChain.probability_table/original