def _get_interval_end_date(self, date=None):

        if self.state == self.STATES.ACTIVE:
            end_date = self.bucket_end_date(reference_date=date)
        elif self.state == self.STATES.CANCELED:
            if self.trial_end and date <= self.trial_end:
                if self.trial_end <= self.cancel_date:
                    end_date = self.trial_end
                else:
                    end_date = self.cancel_date
            else:
                end_date = self.cancel_date
        return end_date
Raise a BadMerkleRootError if the Merkle hash of the
dataset/ETHPy150Open PressLabs/silver/silver/models.py/Subscription._get_interval_end_date--crossover with--dataset/ETHPy150Open maraoz/proofofexistence/pycoin/block.py/Block.check_merkle_hash