code: def keep_label(self, label, relabel=False):
          
  
          self.keep_labels(label, relabel=relabel)
docs: Keep only the specified label.
  
          Parameters
          ----------
          label : int
              The label number to keep.
  
          relabel : bool, optional
              If `True`, then the single segment will be assigned a label
              value of 1.
  
          Examples
          --------
          >>> from photutils import SegmentationImage
          >>> segm = SegmentationImage([[1, 1, 0, 0, 4, 4],
          ...                           [0, 0, 0, 0, 0, 4],
          ...                           [0, 0, 3, 3, 0, 0],
          ...                           [7, 0, 0, 0, 0, 5],
          ...                           [7, 7, 0, 5, 5, 5],
          ...                           [7, 7, 0, 0, 5, 5]])
          >>> segm.keep_label(label=3)
          >>> segm.data
          array([[0, 0, 0, 0, 0, 0],
                 [0, 0, 0, 0, 0, 0],
                 [0, 0, 3, 3, 0, 0],
                 [0, 0, 0, 0, 0, 0],
                 [0, 0, 0, 0, 0, 0],
                 [0, 0, 0, 0, 0, 0]])
  
          >>> segm = SegmentationImage([[1, 1, 0, 0, 4, 4],
          ...                           [0, 0, 0, 0, 0, 4],
          ...                           [0, 0, 3, 3, 0, 0],
          ...                           [7, 0, 0, 0, 0, 5],
          ...                           [7, 7, 0, 5, 5, 5],
          ...                           [7, 7, 0, 0, 5, 5]])
          >>> segm.keep_label(label=3, relabel=True)
          >>> segm.data
          array([[0, 0, 0, 0, 0, 0],
                 [0, 0, 0, 0, 0, 0],
                 [0, 0, 1, 1, 0, 0],
                 [0, 0, 0, 0, 0, 0],
                 [0, 0, 0, 0, 0, 0],
                 [0, 0, 0, 0, 0, 0]])