code: def _fake_hsd_handler(fh_kwargs=None):
      """Create a test file handler."""
      m = mock.mock_open()
      with mock.patch(
          "satpy.readers.ahi_hsd.np.fromfile", _custom_fromfile
      ), mock.patch(
          "satpy.readers.ahi_hsd.unzip_file",
          mock.MagicMock(side_effect=_new_unzip),
      ), mock.patch(
          "satpy.readers.ahi_hsd.open", m, create=True
      ):
          in_fname = "test_file.bz2"
          fh = _create_fake_file_handler(in_fname, fh_kwargs=fh_kwargs)
          yield fh
  
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 3 for calling a global function with example usage: _fake_hsd_handler(fh_kwargs) without return types