docstr: Tests, whether `shuffle()` clears the `intercepted_values` cache.
docstr_tok: ["Tests",",","whether","`","shuffle","(",")","`","clears","the","`","intercepted_values","`","cache","."]
code: def test_shuffle_with_interceptor(self):
      """Tests, whether `shuffle()` clears the `intercepted_values` cache."""
      s = SampleBatch(
          {
              "a": np.array(
                  [1, 2, 3, 2, 3, 4, 3, 4, 5, 4, 5, 6, 5, 6, 7]
              ),
          }
      )
      # Set a summy get-interceptor (returning all values, but plus 1).
      s.set_get_interceptor(lambda v: v + 1)
      # Make sure, interceptor works.
      check(s["a"], [2, 3, 4, 3, 4, 5, 4, 5, 6, 5, 6, 7, 6, 7, 8])
      s.shuffle()
      # Make sure, intercepted values are NOT the original ones (before the shuffle),
      # but have also been shuffled.
      check(
          s["a"],
          [2, 3, 4, 3, 4, 5, 4, 5, 6, 5, 6, 7, 6, 7, 8],
          false=True,
      )
  
imports: import copy
  import functools
  import os
  import unittest
  import numpy
  import torch
  import tree
  import ray
  from ray.rllib.models.repeated_values import RepeatedValues
  from ray.rllib.policy.sample_batch import SampleBatch, attempt_count_timesteps, concat_samples
  from ray.rllib.utils.compression import is_compressed
  from ray.rllib.utils.framework import try_import_torch
  from ray.rllib.utils.test_utils import check
  from ray.rllib.utils.torch_utils import convert_to_torch_tensor
label_desc: Use image node_id 13 for calling the TestSampleBatch obj's underlying member method code with example usage: obj.test_shuffle_with_interceptor() without return types