def removeReader(self, reader):
        wasLost = False
        try:
            fd = reader.fileno()
        except:
            fd = -1
        if fd == -1:
            for fd, fdes in self._selectables.items():
                if reader is fdes:
                    wasLost = True
                    break
            else:
                return
        if fd in self._reads:
            self._reads.remove(fd)
            if fd not in self._writes:
                del self._selectables[fd]
            if not wasLost:
                try:
                    self._updateRegistration(fd, KQ_FILTER_READ, KQ_EV_DELETE)
                except OSError:
                    pass
CaseBlock index relationship should only allow valid values
dataset/ETHPy150Open twisted/twisted/twisted/internet/kqreactor.py/KQueueReactor.removeReader--crossover with--dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/app_manager/tests/test_extension_case.py/CaseBlockIndexRelationshipTest.test_xform_case_block_index_valid_relationship