def get_subtree_weight_OFS(self, lens, state, transition=OFS_TRANSITION):
        """ Compute the weight of the subtree that has
        the given state as root. The weight of a subtree is
        the sum of the weights of all the states that can be
        reached from the root in a given number of transitions.
        """
        w = self.get_state_weight_OFS(state[0], lens)
        if 1 > transition:
            try:
                states = self.markov_model[state[0]]
            except KeyError:
                states = []
            for s in states:
                w += self.get_subtree_weight_OFS(lens, s, transition-1)
        if transition == 1:
                return w
        return w
dataset/ETHPy150Open hgascon/pulsar/pulsar/core/lens.py/MarkovModel.get_subtree_weight_OFS/swapped operands of `>`