def getSimplifiedModel(self, stateFilter=None):
        """ return a map of maps giving the possible transitions from a
        given state. This is for instance useful for plotting:
        import pygraphviz; G = pygraphviz.AGraph(m.getSimplifiedModel(),
                                                 directed=True);
        G.draw("data/robotMinimized.pdf", prog="dot")
        """
        if stateFilter is None:
            ret = self.simplifiedModel
        else:
            ret = {}
            for k in self.simplifiedModel.keys():
                if k in stateFilter:
                    ret[k] = dict([kv for kv in self.simplifiedModel[k].items()
                                   if kv[0] in stateFilter])
        return ret
dataset/ETHPy150Open hgascon/pulsar/pulsar/core/lens.py/MarkovModel.getSimplifiedModel/original