def isTerminal(self, s=None):
        if s is None:
            s = self.state
        return (
            # per L & P 2003
            not (-np.pi / 2.0 < s[StateIndex.THETA] < np.pi / 2.0)
        )
dataset/ETHPy150Open rlpy/rlpy/rlpy/Domains/InfiniteTrackCartPole.py/InfCartPoleBalance.isTerminal/original