public function remove($id_or_external_id) {
    if (count($this) === 0) {
      return true;
    }
    $this->_set_items(array_filter($this->_get_items(), function($item) use ($id_or_external_id) {
      return !($item->id == $id_or_external_id || $item->external_id == $id_or_external_id);
    }));
  }