code: def test_styler_to_s3(s3_public_bucket, s3so):
      # GH#46381
  
      mock_bucket_name, target_file = s3_public_bucket.name, "test.xlsx"
      df = DataFrame({"x": [1, 2, 3], "y": [2, 4, 6]})
      styler = df.style.set_sticky(axis="index")
      styler.to_excel(
          f"s3://{mock_bucket_name}/{target_file}", storage_options=s3so
      )
      timeout = 5
      while True:
          if target_file in (
              obj.key for obj in s3_public_bucket.objects.all()
          ):
              break
          time.sleep(0.1)
          timeout -= 0.1
          assert (
              timeout > 0
          ), "Timed out waiting for file to appear on moto"
          result = read_excel(
              f"s3://{mock_bucket_name}/{target_file}",
              index_col=0,
              storage_options=s3so,
          )
          tm.assert_frame_equal(result, df)
  
file_path: pandas/pandas/tests/io/excel/test_style.py
imports: import contextlib
  import time
  import numpy
  import pytest
  import pandas.util._test_decorators
  from pandas import DataFrame, read_excel
  import pandas._testing
  from pandas.io.excel import ExcelWriter
  from pandas.io.formats.excel import ExcelFormatter
label_desc: Use image node_id 7 for calling a global function with example usage: test_styler_to_s3(s3_public_bucket, s3so) without return types