code: def test_any():
      df = DataFrame(
          [[1, 2, "foo"], [1, np.nan, "bar"], [3, np.nan, "baz"]],
          columns=["A", "B", "C"],
      )
      expected = DataFrame(
          [[True, True], [False, True]],
          columns=["B", "C"],
          index=[1, 3],
      )
      expected.index.name = "A"
      result = df.groupby("A").any()
      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 3 for calling a global function with example usage: test_any() without return types