class_docstr: Tests for the AHI HSD file handler.
class_docstr_tok: ["Tests","for","the","AHI","HSD","file","handler","."]
docstr: Test rounding of the nominal time.
docstr_tok: ["Test","rounding","of","the","nominal","time","."]
code: def test_time_rounding(self):
      """Test rounding of the nominal time."""
      mocker = mock.MagicMock()
      in_date = datetime(2020, 1, 1, 12, 0, 0)
  
      with mock.patch(
          "satpy.readers.ahi_hsd.AHIHSDFileHandler._is_valid_timeline",
          mocker,
      ):
          with _fake_hsd_handler() as fh:
              mocker.return_value = True
              assert fh._modify_observation_time_for_nominal(
                  in_date
              ) == datetime(2020, 1, 1, 3, 0, 0)
              mocker.return_value = False
              with pytest.warns(
                  UserWarning,
                  match=r"Observation timeline is fill value, not rounding observation time",
              ):
                  assert fh._modify_observation_time_for_nominal(
                      in_date
                  ) == datetime(2020, 1, 1, 12, 0, 0)
  
imports: from __future__ import annotations
  import contextlib
  import unittest
  import warnings
  from datetime import datetime
  from typing import Any, Dict
  from unittest import mock
  import dask.array
  import numpy
  import pytest
  from satpy.readers.ahi_hsd import AHIHSDFileHandler
  from satpy.readers.utils import get_geostationary_mask
  from satpy.tests.utils import make_dataid
label_desc: Use image node_id 11 for calling the TestAHIHSDFileHandler obj's underlying member method code with example usage: obj.test_time_rounding() without return types