code: def _create_test_netcdf(filename, resolution=742):
      size = 2
      if resolution == 371:
          size = 4
      data_visir = np.array(np.arange(1, size * size + 1)).reshape(
          size, size
      )
      lat = 33.0 * data_visir
      lon = -13.0 * data_visir
  
      lat = xr.DataArray(
          lat,
          dims=("y", "x"),
          attrs={
              "name": "lat",
              "standard_name": "latitude",
              "modifiers": np.array([]),
          },
      )
      lon = xr.DataArray(
          lon,
          dims=("y", "x"),
          attrs={
              "name": "lon",
              "standard_name": "longitude",
              "modifiers": np.array([]),
          },
      )
  
      solar_zenith_angle_i = xr.DataArray(
          data_visir,
          dims=("y", "x"),
          attrs={
              "name": "solar_zenith_angle",
              "coordinates": "lat lon",
              "resolution": resolution,
          },
      )
  
      scene = Scene()
      scene.attrs["sensor"] = ["viirs"]
      scene_dict = {
          "lat": lat,
          "lon": lon,
          "solar_zenith_angle": solar_zenith_angle_i,
      }
  
      tstart = datetime(2019, 4, 1, 12, 0)
      tend = datetime(2019, 4, 1, 12, 15)
      common_attrs = {
          "start_time": tstart,
          "end_time": tend,
          "platform_name": "NOAA 20",
          "orbit_number": 99999,
      }
  
      for key in scene_dict:
          scene[key] = scene_dict[key]
          if key != "swath_data":
              scene[key].attrs.update(common_attrs)
      scene.save_datasets(
          writer="cf",
          filename=filename,
          engine="h5netcdf",
          flatten_attrs=True,
          pretty=True,
      )
      return filename
  
imports: import warnings
  from datetime import datetime
  import numpy
  import pytest
  import xarray
  from pyresample import AreaDefinition, SwathDefinition
  from satpy import Scene
  from satpy.dataset.dataid import WavelengthRange
  from satpy.readers.satpy_cf_nc import SatpyCFFileHandler
label_desc: Use image node_id 1 for calling a global function with example usage: _create_test_netcdf(filename, resolution) and returns: filename