code: def test_bytesio(fig1):
      """Verify that writing to a BytesIO object contains the same data as to_image().
  
      The goal of this test is to ensure that Plotly correctly handles a writable buffer
      which doesn't correspond to a filesystem path.
      """
      bio = BytesIO()
      pio.write_image(fig1, bio, format="jpg", validate=False)
      bio.seek(0)
      bio_bytes = bio.read()
      to_image_bytes = pio.to_image(fig1, format="jpg", validate=False)
      assert bio_bytes == to_image_bytes
  
imports: import plotly
  import plotly.io
  import plotly.graph_objs
  import os
  import shutil
  import pytest
  import sys
  import pandas
  from io import BytesIO
label_desc: Use image node_id 19 for calling a global function with example usage: test_bytesio(fig1) without return types