code: def test_dataframe_metadata(self):
      df = tm.SubclassedDataFrame(
          {"X": [1, 2, 3], "Y": [1, 2, 3]}, index=["a", "b", "c"]
      )
      df.testattr = "XXX"
  
      assert df.testattr == "XXX"
      assert df[["X"]].testattr == "XXX"
      assert df.loc[["a", "b"], :].testattr == "XXX"
      assert df.iloc[[0, 1], :].testattr == "XXX"
  
      # see gh-9776
      assert df.iloc[0:1, :].testattr == "XXX"
  
      # see gh-10553
      unpickled = tm.round_trip_pickle(df)
      tm.assert_frame_equal(df, unpickled)
      assert df._metadata == unpickled._metadata
      assert df.testattr == unpickled.testattr
  
imports: import numpy
  import pytest
  import pandas
  from pandas import DataFrame, Index, MultiIndex, Series
  import pandas._testing
label_desc: Use image node_id 2 for calling the TestDataFrameSubclassing obj's underlying member method code with example usage: obj.test_dataframe_metadata() without return types