code: def test_dtypes_gh8722(self, float_string_frame):
      float_string_frame["bool"] = float_string_frame["A"] > 0
      result = float_string_frame.dtypes
      expected = Series(
          {k: v.dtype for k, v in float_string_frame.items()},
          index=result.index,
      )
      tm.assert_series_equal(result, expected)
  
      # compat, GH 8722
      msg = "use_inf_as_na option is deprecated"
      with tm.assert_produces_warning(FutureWarning, match=msg):
          with option_context("use_inf_as_na", True):
              df = DataFrame([[1]])
              result = df.dtypes
              tm.assert_series_equal(
                  result, Series({0: np.dtype("int64")})
              )
  
file_path: pandas/pandas/tests/frame/methods/test_dtypes.py
imports: from datetime import timedelta
  import numpy
  import pytest
  from pandas.core.dtypes.dtypes import DatetimeTZDtype
  import pandas
  from pandas import DataFrame, Series, date_range, option_context
  import pandas._testing
label_desc: Use image node_id 5 for calling the TestDataFrameDataTypes obj's underlying member method code with example usage: obj.test_dtypes_gh8722(float_string_frame) without return types