docstr: Tests, whether zero-hot is properly done when fill=0.
docstr_tok: ["Tests",",","whether","zero-hot","is","properly","done","when","fill=0","."]
code: def test_get_with_complex_space(self):
      """Tests, whether zero-hot is properly done when fill=0."""
      buffer = BufferWithInfiniteLookback(
          data=[
              get_dummy_batch_for_space(
                  space=self.space,
                  batch_size=0,
                  fill_value=float(i),
              )
              for i in range(4)
          ],
          lookback=2,
          # Specify a space, so we can fill and one-hot discrete data properly.
          space=self.space,
      )
  
      # Test on ongoing and finalized buffer.
      for finalized in [False, True]:
          if finalized:
              buffer.finalize()
  
              def batch_(s):
                  return batch(s)
  
          else:
  
              def batch_(s):
                  return s
  
          self.assertTrue(len(buffer), 2)
  
          check(buffer.get(-1), self.buffer_3)
          check(buffer.get(-2), self.buffer_2)
          check(buffer.get(-3), self.buffer_1)
          check(buffer.get(-4), self.buffer_0)
          check(buffer.get(-5, fill=0.0), self.buffer_0)
          check(
              buffer.get([-5, 5], fill=0.0),
              batch_([self.buffer_0, self.buffer_0]),
          )
          check(
              buffer.get([-5, 1], fill=0.0),
              batch_([self.buffer_0, self.buffer_3]),
          )
          check(
              buffer.get([1, -10], fill=0.0),
              batch_([self.buffer_3, self.buffer_0]),
          )
          check(
              buffer.get([-10], fill=0.0, one_hot_discrete=True),
              batch_([self.buffer_0_one_hot]),
          )
          check(
              buffer.get(slice(0, 1), fill=0.0), batch_([self.buffer_2])
          )
          check(
              buffer.get(slice(1, 3), fill=0.0),
              batch_([self.buffer_3, self.buffer_0]),
          )
          check(
              buffer.get(slice(-10, -12), fill=0.0),
              batch_([self.buffer_0, self.buffer_0]),
          )
          check(
              buffer.get(
                  slice(-10, -12),
                  fill=0.0,
                  neg_indices_left_of_zero=True,
              ),
              batch_([self.buffer_0, self.buffer_0]),
          )
          check(
              buffer.get(
                  slice(100, 98),
                  fill=0.0,
                  neg_indices_left_of_zero=True,
              ),
              batch_([self.buffer_0, self.buffer_0]),
          )
          check(
              buffer.get(slice(100, 98), fill=0.0),
              batch_([self.buffer_0, self.buffer_0]),
          )
  
file_path: ray/rllib/env/tests/test_lookback_buffer.py
imports: import unittest
  import gymnasium
  import numpy
  from ray.rllib.env.utils import BufferWithInfiniteLookback
  from ray.rllib.utils.spaces.space_utils import batch, get_dummy_batch_for_space
  from ray.rllib.utils.test_utils import check
label_desc: Use image node_id 8 for calling the TestBufferWithInfiniteLookback obj's underlying member method code with example usage: obj.test_get_with_complex_space() and returns: batch, s