code: def compare_checkpoints(self, attr_mean):
          
          if self._cmp_greater and attr_mean > self.best_checkpoint_attr_value:
              return True
          elif (not self._cmp_greater
                and attr_mean < self.best_checkpoint_attr_value):
              return True
          return False
docs: Compares two checkpoints based on the attribute attr_mean param.
          Greater than is used by default. If  command-line parameter
          checkpoint_score_attr starts with "min-" less than is used.
  
          Arguments:
              attr_mean: mean of attribute value for the current checkpoint
  
          Returns:
              True: when attr_mean is greater than previous checkpoint attr_mean
                    and greater than function is selected
                    when attr_mean is less than previous checkpoint attr_mean and
                    less than function is selected
              False: when attr_mean is not in alignment with selected cmp fn