code: def test_construct_1d_ndarray_preserving_na_datetimelike(dtype):
      arr = np.arange(5, dtype=np.int64).view(dtype)
      expected = np.array(list(arr), dtype=object)
      assert all(isinstance(x, type(arr[0])) for x in expected)
  
      result = sanitize_array(arr, index=None, dtype=np.dtype(object))
      tm.assert_numpy_array_equal(result, expected)
  
imports: import numpy
  import pytest
  import pandas
  import pandas._testing
  from pandas.core.construction import sanitize_array
label_desc: Use image node_id 2 for calling a global function with example usage: test_construct_1d_ndarray_preserving_na_datetimelike(dtype) without return types