code: def test_sparse_options(df_ext, option, value):
      cidx = MultiIndex.from_tuples(
          [("Z", "a"), ("Z", "b"), ("Y", "c")]
      )
      ridx = MultiIndex.from_tuples(
          [("A", "a"), ("A", "b"), ("B", "c")]
      )
      df_ext.index, df_ext.columns = ridx, cidx
      styler = df_ext.style
  
      latex1 = styler.to_latex()
      with option_context(option, value):
          latex2 = styler.to_latex()
      assert (latex1 == latex2) is value
  
imports: from textwrap import dedent
  import numpy
  import pytest
  from pandas import DataFrame, MultiIndex, Series, option_context
  from pandas.io.formats.style import Styler
  from pandas.io.formats.style_render import _parse_latex_cell_styles, _parse_latex_css_conversion, _parse_latex_header_span, _parse_latex_table_styles, _parse_latex_table_wrapping
label_desc: Use image node_id 22 for calling a global function with example usage: test_sparse_options(df_ext, option, value) without return types