code: def test_morris_to_df():
      params = ["x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8"]
  
      problem = {
          "num_vars": 8,
          "names": params,
          "groups": None,
          "bounds": [
              [0.0, 1.0],
              [0.0, 1.0],
              [0.0, 1.0],
              [0.0, 1.0],
              [0.0, 1.0],
              [0.0, 1.0],
              [0.0, 1.0],
              [0.0, 1.0],
          ],
      }
  
      param_values = morris_sample.sample(
          problem, N=1000, num_levels=4, optimal_trajectories=None
      )
      Y = Sobol_G.evaluate(param_values)
      Si = morris.analyze(problem, param_values, Y)
      Si_df = Si.to_df()
  
      assert isinstance(
          Si_df, pd.DataFrame
      ), "Morris Si: Expected DataFrame, got {}".format(type(Si_df))
  
      expected_index = set(params)
      assert (
          set(Si_df.index) == expected_index
      ), "Incorrect index in DataFrame"
  
      col_names = ["mu", "mu_star", "sigma", "mu_star_conf"]
      assert set(Si_df.columns) == set(
          col_names
      ), "Unexpected column names in DataFrame. Expected {}, got {}".format(
          col_names, Si_df.columns
      )
  
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 1 for calling a global function with example usage: test_morris_to_df() without return types