code: def test_sobol_to_df():
      params = ["x1", "x2", "x3"]
      problem = {
          "num_vars": 3,
          "names": params,
          "bounds": [[-np.pi, np.pi]] * 3,
      }
  
      X = saltelli.sample(problem, 512)
      Y = Ishigami.evaluate(X)
      Si = sobol.analyze(problem, Y, print_to_console=False)
      total, first, second = Si.to_df()
  
      assert isinstance(
          total, pd.DataFrame
      ), "Total Si: Expected DataFrame, got {}".format(type(total))
      assert isinstance(
          first, pd.DataFrame
      ), "First Si: Expected DataFrame, got {}".format(type(first))
      assert isinstance(
          second, pd.DataFrame
      ), "Second Si: Expected DataFrame, got {}".format(type(second))
  
      expected_index = set(params)
      assert (
          set(total.index) == expected_index
      ), "Index for Total Si are incorrect"
      assert (
          set(first.index) == expected_index
      ), "Index for first order Si are incorrect"
      assert set(second.index) == set(
          [("x1", "x2"), ("x1", "x3"), ("x2", "x3")]
      ), "Index for second order Si are incorrect"
  
file_path: SALib/tests/test_to_df.py
imports: import numpy
  import pandas
  from SALib.sample import saltelli, morris, finite_diff, fast_sampler, ff, latin
  from SALib.analyze import sobol, morris, dgsm, fast, ff, rbd_fast
  from SALib.test_functions import Ishigami, Sobol_G
label_desc: Use image node_id 2 for calling a global function with example usage: test_sobol_to_df() without return types