code: def unique(self, sort=False):
          
          unique_vals = np.unique(self.numpy())
          if sort:
              unique_vals = np.sort(unique_vals)
          return unique_vals
docs: Return unique set of values in image