docstr: bz2 and xz do not write the byte order mark (BOM) for utf-16/32.
  
  https://stackoverflow.com/questions/55171439
  
  GH 35681
code: def test_warning_missing_utf_bom(self, encoding, compression_):
      """
      bz2 and xz do not write the byte order mark (BOM) for utf-16/32.
  
      https://stackoverflow.com/questions/55171439
  
      GH 35681
      """
      df = pd.DataFrame(
          1.1 * np.arange(120).reshape((30, 4)),
          columns=pd.Index(list("ABCD"), dtype=object),
          index=pd.Index([f"i-{i}" for i in range(30)], dtype=object),
      )
      with tm.ensure_clean() as path:
          with tm.assert_produces_warning(UnicodeWarning):
              df.to_csv(
                  path, compression=compression_, encoding=encoding
              )
  
          # reading should fail (otherwise we wouldn't need the warning)
          msg = r"UTF-\d+ stream does not start with BOM"
          with pytest.raises(UnicodeError, match=msg):
              pd.read_csv(
                  path, compression=compression_, encoding=encoding
              )
  
imports: import codecs
  import errno
  from functools import partial
  from io import BytesIO, StringIO, UnsupportedOperation
  import mmap
  import os
  from pathlib import Path
  import pickle
  import tempfile
  import numpy
  import pytest
  from pandas.compat import is_platform_windows
  import pandas.util._test_decorators
  import pandas
  import pandas._testing
  import pandas.io.common
label_desc: Use image node_id 5 for calling the TestMMapWrapper obj's underlying member method code with example usage: obj.test_warning_missing_utf_bom(encoding, compression_) without return types