code: def filter_by_func(self, func:Callable)->'ItemList':
          "Only keep elements for which `func` returns `True`."
          self.items = array([o for o in self.items if func(o)])
          return self filter_by_func(self, func:Callable)->'ItemList':
          "Only keep elements for which `func` returns `True`."
          self.items = array([o for o in self.items if func(o)])
          return self
docs: Only keep elements for which `func` returns `True`.