code: def _create_fake_reader(
      filenames: list[str],
      reader_kwargs: dict,
      exp_loadable_files: int | None = None,
  ) -> FileYAMLReader:
      exp_loadable_files = (
          exp_loadable_files
          if exp_loadable_files is not None
          else len(filenames)
      )
      reader_configs = config_search_paths(
          os.path.join("readers", "mirs.yaml")
      )
      with mock.patch("satpy.readers.mirs.xr.open_dataset") as od:
          od.side_effect = fake_open_dataset
          r = load_reader(reader_configs)
          loadables = r.select_files_from_pathnames(filenames)
          r.create_filehandlers(loadables, fh_kwargs=reader_kwargs)
  
          assert isinstance(r, FileYAMLReader)
          assert len(loadables) == exp_loadable_files
          assert r.file_handlers
      return r
  
imports: from __future__ import annotations
  import os
  from datetime import datetime
  from unittest import mock
  import numpy
  import pytest
  import xarray
  from satpy._config import config_search_paths
  from satpy.dataset import DataID
  from satpy.readers import load_reader
  from satpy.readers.yaml_reader import FileYAMLReader
label_desc: Use image node_id 7 for calling a global function with example usage: _create_fake_reader(filenames, reader_kwargs, exp_loadable_files) and returns: r