code: def split_by_valid_func(self, func:Callable)->'ItemLists':
          "Split the data by result of `func` (which returns `True` for validation set)."
          valid_idx = [i for i,o in enumerate(self.items) if func(o)]
          return self.split_by_idx(valid_idxf split_by_valid_func(self, func:Callable)->'ItemLists':
          "Split the data by result of `func` (which returns `True` for validation set)."
          valid_idx = [i for i,o in enumerate(self.items) if func(o)]
          return self.split_by_idx(valid_idx)
docs: Split the data by result of `func` (which returns `True` for validation set).