code: def get_fake_file_handler(
      observation_start_time,
      nlines,
      ncols,
      projection_longitude=0,
      orbit_polynomials=ORBIT_POLYNOMIALS,
  ):
      """Create a mocked SEVIRI HRIT file handler."""
      import warnings
  
      prologue = get_fake_prologue(
          projection_longitude, orbit_polynomials
      )
      mda = get_fake_mda(
          nlines=nlines, ncols=ncols, start_time=observation_start_time
      )
      filename_info = get_fake_filename_info(observation_start_time)
      epilogue = get_fake_epilogue()
  
      m = mock.mock_open()
      with mock.patch(
          "satpy.readers.seviri_l1b_hrit.np.fromfile"
      ) as fromfile, mock.patch(
          "satpy.readers.hrit_base.open", m, create=True
      ) as newopen, mock.patch(
          "satpy.readers.utils.open", m, create=True
      ) as utilopen, mock.patch(
          "satpy.readers.seviri_l1b_hrit.CHANNEL_NAMES"
      ), mock.patch.object(
          HRITMSGFileHandler, "_get_hd", new=new_get_hd
      ), mock.patch.object(
          HRITMSGPrologueFileHandler,
          "read_prologue",
          new=get_new_read_prologue(prologue),
      ):
          fromfile.return_value = np.array(
              [(1, 2)],
              dtype=[("total_header_length", int), ("hdr_id", int)],
          )
          newopen.return_value.__enter__.return_value.tell.return_value = (
              1
          )
          # The size of the return value hereafter was chosen arbitrarily with the expectation
          # that it would return sufficiently many bytes for testing the fake-opening of HRIT
          # files.
          utilopen.return_value.__enter__.return_value.read.return_value = bytes(
              [0] * 8192
          )
          prologue = HRITMSGPrologueFileHandler(
              filename="dummy_prologue_filename",
              filename_info=filename_info,
              filetype_info={},
          )
          epilogue = mock.MagicMock(epilogue=epilogue)
  
          with warnings.catch_warnings():
              # Orbit polynomial has no exact match, so filter the unnecessary warning
              warnings.filterwarnings(
                  "ignore",
                  category=UserWarning,
                  message=r"No orbit polynomial valid for",
              )
              reader = HRITMSGFileHandler(
                  "filename",
                  filename_info,
                  {"filetype": "info"},
                  prologue,
                  epilogue,
              )
          reader.mda.update(mda)
          return reader
  
file_path: satpy/satpy/tests/reader_tests/test_seviri_l1b_hrit_setup.py
imports: from datetime import datetime
  from unittest import mock
  import numpy
  from satpy.readers.seviri_l1b_hrit import HRITMSGFileHandler, HRITMSGPrologueFileHandler
  from satpy.tests.reader_tests.test_seviri_base import ORBIT_POLYNOMIALS
label_desc: Use image node_id 3 for calling a global function with example usage: get_fake_file_handler(observation_start_time, nlines, ncols, projection_longitude, orbit_polynomials) and returns: reader