code: def f(x):
      return x[np.isfinite(x)].mean()
  
imports: import numpy
  import pytest
  from pandas import DataFrame, Index, MultiIndex, Series, Timestamp, concat, date_range, isna, notna
  import pandas._testing
  from pandas.tseries import offsets
label_desc: Use image node_id 1 for calling a global function with example usage: f(x) and returns: x