code: def test_ea_dtype(dtype):
      # GH#56765
      bins = [(0.0, 0.4), (0.4, 0.6)]
      interval_dtype = IntervalDtype(subtype=dtype, closed="left")
      result = IntervalIndex.from_tuples(
          bins, closed="left", dtype=interval_dtype
      )
      assert result.dtype == interval_dtype
      expected = IntervalIndex.from_tuples(bins, closed="left").astype(
          interval_dtype
      )
      tm.assert_index_equal(result, expected)
  
imports: from functools import partial
  import numpy
  import pytest
  import pandas.util._test_decorators
  from pandas.core.dtypes.common import is_unsigned_integer_dtype
  from pandas.core.dtypes.dtypes import IntervalDtype
  from pandas import Categorical, CategoricalDtype, CategoricalIndex, Index, Interval, IntervalIndex, date_range, notna, period_range, timedelta_range
  import pandas._testing
  from pandas.core.arrays import IntervalArray
  import pandas.core.common
label_desc: Use image node_id 3 for calling a global function with example usage: test_ea_dtype(dtype) without return types