code: def test_encode_decode_pandas():
      """Test encoding/decoding of various pandas objects to/from JSON."""
      pytest.importorskip("pandas")
      import pandas as pd
  
      obj_df = pd.DataFrame(
          np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]),
          columns=["a", "b", "c"],
      )
      encoded_df = encode4js(obj_df)
      decoded_df = decode4js(encoded_df)
      assert np.all(pd.DataFrame.eq(obj_df, decoded_df))
      assert isinstance(decoded_df, pd.DataFrame)
  
      obj_ser = pd.Series([1, 2, 3, 4], index=["a", "b", "c", "d"])
      encoded_ser = encode4js(obj_ser)
      decoded_ser = decode4js(encoded_ser)
      assert np.all(pd.Series.eq(obj_ser, decoded_ser))
      assert isinstance(decoded_ser, pd.Series)
  
file_path: lmfit-py/tests/test_jsonutils.py
imports: from types import BuiltinFunctionType, FunctionType
  import numpy
  import pytest
  from scipy.optimize import basinhopping
  import lmfit
  from lmfit.jsonutils import decode4js, encode4js, find_importer, import_from
  from lmfit.printfuncs import alphanumeric_sort
label_desc: Use image node_id 3 for calling a global function with example usage: test_encode_decode_pandas() without return types