code: def test_pandas_to_pyarrow_with_missing(np_float):
      if Version(pd.__version__) < Version("1.5.0"):
          pytest.skip("__dataframe__ added to pandas in 1.5.0")
  
      np_array = np.array([0, np.nan, 2], dtype=np_float)
      datetime_array = [None, dt(2007, 7, 14), dt(2007, 7, 15)]
      df = pd.DataFrame(
          {
              "a": np_array,  # float, ColumnNullType.USE_NAN
              "dt": datetime_array,  # ColumnNullType.USE_SENTINEL
          }
      )
      expected = pa.table(
          {
              "a": pa.array(np_array, from_pandas=True),
              "dt": pa.array(datetime_array, type=pa.timestamp("ns")),
          }
      )
      result = pi.from_dataframe(df)
  
      assert result.equals(expected)
  
imports: from datetime import datetime
  import numpy
  import pyarrow
  from pyarrow.vendored.version import Version
  import pytest
  import pyarrow.interchange
  from pyarrow.interchange.column import _PyArrowColumn, ColumnNullType, DtypeKind
  from pyarrow.interchange.from_dataframe import _from_dataframe
label_desc: Use image node_id 10 for calling a global function with example usage: test_pandas_to_pyarrow_with_missing(np_float) without return types