def METHOD_NAME(self):
    with self.env.getClusterConnectionIfNeeded() as r:
        key = 'tester'
        key_no_dup = 'tester_no_dup'
        r.execute_command('TS.CREATE', key, 'DUPLICATE_POLICY', 'LAST')
        r.execute_command('TS.CREATE', key_no_dup)
        _fill_data(r, key)
        date_ranges = _fill_data(r, key_no_dup)
        overrided_ts = date_ranges[0][0] + 10
        overrided_value = 666
        with pytest.raises(redis.ResponseError):
            r.execute_command('TS.ADD', key_no_dup, overrided_ts, overrided_value)
        assert r.execute_command('TS.ADD', key, overrided_ts, overrided_value) == overrided_ts
        assert r.execute_command('TS.RANGE', key_no_dup, overrided_ts, overrided_ts) == [
            [overrided_ts, str(overrided_ts).encode('ascii')]]
        assert r.execute_command('TS.RANGE', key, overrided_ts, overrided_ts) == [
            [overrided_ts, str(overrided_value).encode('ascii')]]
        # check that inserting a non-duplicate sample doesn't fail
        non_dup_ts = date_ranges[0][1] + 1
        assert r.execute_command('TS.ADD', key_no_dup, non_dup_ts, overrided_value) == non_dup_ts
        # check that `ON_DUPLICATE` overrides the module configuration
        assert r.execute_command('TS.ADD', key_no_dup, overrided_ts, overrided_value, 'ON_DUPLICATE',
                                 'LAST') == overrided_ts
        assert r.execute_command('TS.RANGE', key_no_dup, overrided_ts, overrided_ts) == [
            [overrided_ts, str(overrided_value).encode('ascii')]]
        # check that `ON_DUPLICATE` overrides the key configuration
        assert r.execute_command('TS.ADD', key, overrided_ts, overrided_value * 10, 'ON_DUPLICATE',
                                 'MAX') == overrided_ts
        assert r.execute_command('TS.RANGE', key, overrided_ts, overrided_ts) == \
               [[overrided_ts, str(overrided_value * 10).encode('ascii')]]