def _processRelayEndCell(self, cell, origin):
        sid = cell.rheader.stream_id

        try:
            self._streams[sid].closeFromCircuit()
            # TODO: handle REASON_EXITPOLICY
            if cell.reason != REASON_DONE:
                msg = ("Circuit {} received a RelayEndCell for stream {}, "
                       "and reason was not REASON_DONE. Reason: {}."
                       .format(self.circuit_id, sid, cell.reason))
                logging.debug(msg)
        except KeyError:
            msg = ("Circuit {} received a RelayEndCell for nonexistent "
                   "stream {}. Dropping cell.".format(self.circuit_id, sid))
            logging.debug(msg)
Called when this circuit receives a RelayEndCell.
dataset/ETHPy150Open nskinkel/oppy/oppy/circuit/circuit.py/Circuit._processRelayEndCell