code: def test_groupby_dropna_series_level(dropna, idx, expected):
      ser = pd.Series([1, 2, 3, 3], index=idx)
  
      result = ser.groupby(level=0, dropna=dropna).sum()
      tm.assert_series_equal(result, expected)
  
imports: import numpy
  import pytest
  from pandas.compat.pyarrow import pa_version_under10p1
  from pandas.core.dtypes.missing import na_value_for_dtype
  import pandas
  import pandas._testing
  from pandas.tests.groupby import get_groupby_method_args
label_desc: Use image node_id 4 for calling a global function with example usage: test_groupby_dropna_series_level(dropna, idx, expected) without return types