code: def test_ops_general(op, targop):
      df = DataFrame(np.random.default_rng(2).standard_normal(1000))
      labels = (
          np.random.default_rng(2)
          .integers(0, 50, size=1000)
          .astype(float)
      )
  
      result = getattr(df.groupby(labels), op)()
      warn = (
          None
          if op in ("first", "last", "count", "sem")
          else FutureWarning
      )
      msg = f"using DataFrameGroupBy.{op}"
      with tm.assert_produces_warning(warn, match=msg):
          expected = df.groupby(labels).agg(targop)
      tm.assert_frame_equal(result, expected)
  
imports: import builtins
  import datetime
  from string import ascii_lowercase
  import numpy
  import pytest
  from pandas._libs.tslibs import iNaT
  import pandas
  from pandas import DataFrame, MultiIndex, Series, Timestamp, date_range, isna
  import pandas._testing
  from pandas.util import _test_decorators
label_desc: Use image node_id 47 for calling a global function with example usage: test_ops_general(op, targop) without return types