code: def test_to_integer_array_inferred_dtype(constructor):
      # if values has dtype -> respect it
      result = constructor(np.array([1, 2], dtype="int8"))
      assert result.dtype == Int8Dtype()
      result = constructor(np.array([1, 2], dtype="int32"))
      assert result.dtype == Int32Dtype()
  
      # if values have no dtype -> always int64
      result = constructor([1, 2])
      assert result.dtype == Int64Dtype()
  
imports: import numpy
  import pytest
  import pandas
  import pandas._testing
  from pandas.api.types import is_integer
  from pandas.core.arrays import IntegerArray
  from pandas.core.arrays.integer import Int8Dtype, Int32Dtype, Int64Dtype
label_desc: Use image node_id 9 for calling a global function with example usage: test_to_integer_array_inferred_dtype(constructor) without return types