code: def remove_labels(self, test):
          
          ii = 0
          while ii < len(self.labels):
              if test(self.labels[ii]):
                  self.labels.pop(ii)
              else:
                  ii += 1
          return self
docs: Remove labels from this cell.
  
          The function or callable ``test`` is called for each label in
          the cell.  If its return value evaluates to ``True``, the
          corresponding label is removed from the cell.
  
          Parameters
          ----------
          test : callable
              Test function to query whether a label should be removed.
              The function is called with the label as the only argument.
  
          Returns
          -------
          out : ``Cell``
              This cell.
  
          Examples
          --------
          Remove labels in layer 1:
  
          >>> cell.remove_labels(lambda lbl: lbl.layer == 1)