code: def test_moment_functions_zero_length(f):
      # GH 8056
      s = Series(dtype=np.float64)
      s_expected = s
      df1 = DataFrame()
      df1_expected = df1
      df2 = DataFrame(columns=["a"])
      df2["a"] = df2["a"].astype("float64")
      df2_expected = df2
  
      s_result = f(s)
      tm.assert_series_equal(s_result, s_expected)
  
      df1_result = f(df1)
      tm.assert_frame_equal(df1_result, df1_expected)
  
      df2_result = f(df2)
      tm.assert_frame_equal(df2_result, df2_expected)
  
imports: import numpy
  import pytest
  from pandas import DataFrame, DatetimeIndex, Index, MultiIndex, Series, isna, notna
  import pandas._testing
label_desc: Use image node_id 27 for calling a global function with example usage: test_moment_functions_zero_length(f) without return types