code: def check_duplicates(self):
          
  
          if self.aggregator is not None:
              X, Y = TopologicalObject.aggregate_duplicates(
                  self.X, self.Y, self.aggregator
              )
              self.X = X
              self.Y = Y
  
          temp_x = self.X.round(decimals=TopologicalObject.precision)
          unique_xs = len(np.unique(temp_x, axis=0))
  
          # unique_ys = len(np.unique(self.Y, axis=0))
          # if len(self.Y) != unique_ys:
          #     warnings.warn('Range space has duplicates. Simulation of '
          #                   'simplicity may help, but artificial noise may '
          #                   'occur in flat regions of the domain. Sample size:'
          #                   '{} vs. Unique Records: {}'.format(len(self.Y),
          #                                                      unique_ys))
  
          if len(self.X) != unique_xs:
              raise ValueError(
                  "Domain space has duplicates. Try using an "
                  "aggregator function to consolidate duplicates "
                  "into a single sample with one range value. "
                  "e.g., " + self.__class__.__name__ + "(aggregator='max'). "
                  "\n\tNumber of "
                  "Records: {}\n\tNumber of Unique Records: {}\n".format(
                      len(self.X), unique_xs
                  )
              )
docs: Function to test whether duplicates exist in the input or
              output space. First, if an aggregator function has been
              specified, the domain space duplicates will be consolidated
              using the function to generate a new range value for that
              shared point. Otherwise, it will raise a ValueError.
              The function will raise a warning if duplicates exist in the
              output space
              @Out, None