code: def test_truncate_datetime_containing_NaT():
      """Ensure NaT is ignored safely (no-op) and no TypeError is thrown."""
      x = datetime(2022, 3, 21, 9, 1, 15, 666)
      df = pd.DataFrame({"dt": [x, pd.NaT], "foo": [np.nan, 3]})
      expected = pd.DataFrame(
          {"dt": [x.replace(microsecond=0), pd.NaT], "foo": [np.nan, 3]}
      )
  
      result = df.truncate_datetime_dataframe("second")
      assert_frame_equal(result, expected)
  
file_path: pyjanitor/tests/functions/test_truncate_datetime.py
imports: from datetime import datetime
  import numpy
  import pandas
  import pytest
  from pandas.testing import assert_frame_equal
label_desc: Use image node_id 4 for calling a global function with example usage: test_truncate_datetime_containing_NaT() without return types