docstr: We can read content of the stream only once, so expect `stream_producer`
docstr_tok: ["We","can","read","content","of","the","stream","only","once",",","so","expect","`","stream_producer","`"]
code: def _test_stream_content(
      self, file_producer, expected_content, expected_ext
  ):
      """We can read content of the stream only once, so expect `stream_producer`"""
      file = file_producer()
      self.assertIs(file.file_type, FileType.STREAM)
      with self.assertRaises(NeptuneException):
          _ = file.path
      self.assertEqual(expected_ext, file.extension)
  
      file = file_producer()
      self.assertEqual(expected_content, file.content)
      file = file_producer()
      self.assertEqual(
          expected_content, self._save_and_return_content(file)
      )
  
imports: import pickle
  import unittest
  from io import BytesIO, StringIO
  import numpy
  from bokeh.plotting import figure
  from PIL import Image
  from neptune.exceptions import NeptuneException, StreamAlreadyUsedException
  from neptune.internal.types.file_types import FileType, InMemoryComposite
  from neptune.internal.utils.images import _get_pil_image_data
  from neptune.types import File
  from tests.e2e.utils import tmp_context
label_desc: Use image node_id 8 for calling the TestFile obj's underlying member method code with example usage: obj._test_stream_content(file_producer, expected_content, expected_ext) without return types