def trim_relative(self, amount=0.15):
        trim = float(amount)
        if not 0.0 <= trim <= 1.0:
            raise ValueError('expected amount between 0.0 and 1.0, not %r'
                             % trim)
        size = len(self.data)
        size_diff = int(size * trim)
        if size_diff == 0.0:
            return
        self.data = self._get_sorted_data()[size_diff:-size_diff]
        self.clear_cache()
A utility function used to cut a proportion of values off each end
dataset/ETHPy150Open mahmoud/boltons/boltons/statsutils.py/Stats.trim_relative