code: def test_ff_to_df():
      params = ["x1", "x2", "x3"]
      main_index = params + ["dummy_0"]
  
      problem = {
          "num_vars": 3,
          "names": params,
          "groups": None,
          "bounds": [
              [-3.14159265359, 3.14159265359],
              [-3.14159265359, 3.14159265359],
              [-3.14159265359, 3.14159265359],
          ],
      }
  
      X = ff_sample.sample(problem)
      Y = (
          X[:, 0]
          + (0.1 * X[:, 1])
          + ((1.2 * X[:, 2]) * (0.2 + X[:, 0]))
      )
      Si = ff.analyze(
          problem, X, Y, second_order=True, print_to_console=False
      )
      main_effect, inter_effect = Si.to_df()
  
      assert isinstance(
          main_effect, pd.DataFrame
      ), "FF ME: Expected DataFrame, got {}".format(type(main_effect))
      assert isinstance(
          main_effect, pd.DataFrame
      ), "FF IE: Expected DataFrame, got {}".format(type(inter_effect))
      assert set(main_effect.index) == set(
          main_index
      ), "Incorrect index in Main Effect DataFrame"
  
      inter_index = set(
          [
              ("x1", "x2"),
              ("x1", "x3"),
              ("x2", "x3"),
              ("x1", "dummy_0"),
              ("x2", "dummy_0"),
              ("x3", "dummy_0"),
          ]
      )
      assert (
          set(inter_effect.index) == inter_index
      ), "Incorrect index in Interaction Effect DataFrame"
  
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 5 for calling a global function with example usage: test_ff_to_df() without return types