def _filter_invalid_entities(self, db: 'EntityDB') -> List[DXFEntity]:
    assert (db is not None)
    return [e for e in self._data if (e.is_alive and self._has_valid_owner(e, db))]
def _filter_invalid_entities(self, db: 'EntityDB') -> List[DXFEntity]:
    assert (db is not None)
    return [e for e in self._data if (e.is_alive and self._has_valid_owner(e, db))]