def load_markov_model(self, model_file):
        """ Return markov model from Prisma output file as a dictionary
        where keys are current states and values are next possible states
        """

        fd = open(model_file, "r")
        text_markov_model = fd.read()
        fd.close()
        re_markov_model = re.findall("(.*)->(.*),([0-9]*)\n",
                                     text_markov_model)

        markov_model = {}
        for edge in re_markov_model:
            if markov_model in edge[0]:
                (markov_model[edge[0]]).extend([(edge[1], int(edge[2]))])
            else:
                markov_model[edge[0]] = [(edge[1], int(edge[2]))]
        self.order = edge[0].count("|") + 1

        self.markov_model = markov_model
dataset/ETHPy150Open hgascon/pulsar/pulsar/core/lens.py/MarkovModel.load_markov_model/swapped operands of `in`