code: def test_cast_internals(self, float_frame):
      msg = "Passing a BlockManager to DataFrame"
      with tm.assert_produces_warning(
          DeprecationWarning, match=msg, check_stacklevel=False
      ):
          casted = DataFrame(float_frame._mgr, dtype=int)
      expected = DataFrame(float_frame._series, dtype=int)
      tm.assert_frame_equal(casted, expected)
  
      with tm.assert_produces_warning(
          DeprecationWarning, match=msg, check_stacklevel=False
      ):
          casted = DataFrame(float_frame._mgr, dtype=np.int32)
      expected = DataFrame(float_frame._series, dtype=np.int32)
      tm.assert_frame_equal(casted, expected)
  
imports: from datetime import datetime, timedelta
  import itertools
  import numpy
  import pytest
  from pandas.errors import PerformanceWarning
  import pandas
  from pandas import Categorical, DataFrame, Series, Timestamp, date_range, option_context
  import pandas._testing
  from pandas.core.internals.blocks import NumpyBlock
label_desc: Use image node_id 2 for calling the TestDataFrameBlockInternals obj's underlying member method code with example usage: obj.test_cast_internals(float_frame) without return types