class_docstr: Swap-in NetCDF4 File Handler.
docstr: Mimic reader input file content.
docstr_tok: ["Mimic","reader","input","file","content","."]
code: def get_test_content(self, filename, filename_info, filetype_info):
      """Mimic reader input file content."""
      from xarray import DataArray
  
      dt_s = filename_info.get(
          "start_time", datetime(2019, 6, 19, 13, 0)
      )
      dt_e = filename_info.get("end_time", datetime(2019, 6, 19, 13, 0))
  
      if filetype_info["file_type"] == "mimicTPW2_comp":
          file_content = {
              "/attr/start_time": dt_s.strftime("%Y%m%d.%H%M%S"),
              "/attr/end_time": dt_e.strftime("%Y%m%d.%H%M%S"),
              "/attr/platform_shortname": "aggregated microwave",
              "/attr/sensor": "mimic",
          }
          file_content["latArr"] = DEFAULT_LAT
          file_content["latArr/shape"] = (DEFAULT_FILE_SHAPE[0],)
          file_content["latArr/attr/units"] = "degress_north"
  
          file_content["lonArr"] = DEFAULT_LON
          file_content["lonArr/shape"] = (DEFAULT_FILE_SHAPE[1],)
          file_content["lonArr/attr/units"] = "degrees_east"
  
          file_content["tpwGrid"] = DEFAULT_FILE_DATA
          file_content["tpwGrid/shape"] = DEFAULT_FILE_SHAPE
          file_content_units["tpwGrid"] = "mm"
  
          file_content["/dimension/lat"] = DEFAULT_FILE_SHAPE[0]
          file_content["/dimension/lon"] = DEFAULT_FILE_SHAPE[1]
  
          # convert to xarrays
          for key, val in file_content.items():
              if key == "lonArr" or key == "latArr":
                  file_content[key] = DataArray(val)
              elif isinstance(val, np.ndarray):
                  if val.ndim > 1:
                      file_content[key] = DataArray(
                          val,
                          dims=("y", "x"),
                          attrs={"units": file_content_units[key]},
                      )
                  else:
                      file_content[key] = DataArray(val)
      else:
          msg = "Wrong Test Reader for file_type {}".format(
              filetype_info["file_type"]
          )
          raise AssertionError(msg)
  
      return file_content
  
file_path: satpy/satpy/tests/reader_tests/test_mimic_TPW2_nc.py
imports: import os
  import unittest
  from datetime import datetime
  from unittest import mock
  import numpy
  import xarray
  from satpy.tests.reader_tests.test_netcdf_utils import FakeNetCDF4FileHandler
label_desc: Use image node_id 1 for calling the FakeNetCDF4FileHandlerMimic obj's underlying member method code with example usage: obj.get_test_content(filename, filename_info, filetype_info) and returns: file_content