code: def get_test_data(
      input_shape=(100, 50),
      output_shape=(200, 100),
      output_proj=None,
      input_dims=("y", "x"),
  ):
      """Get common data objects used in testing.
  
      Returns:
          tuple:
  
          * input_data_on_area: DataArray with dimensions as if it is a gridded
            dataset.
          * input_area_def: AreaDefinition of the above DataArray
          * input_data_on_swath: DataArray with dimensions as if it is a swath.
          * input_swath: SwathDefinition of the above DataArray
          * target_area_def: AreaDefinition to be used as a target for resampling
  
      """
      import dask.array as da
      from pyresample.geometry import AreaDefinition, SwathDefinition
      from xarray import DataArray
  
      ds1 = DataArray(
          da.zeros(input_shape, chunks=85),
          dims=input_dims,
          attrs={"name": "test_data_name", "test": "test"},
      )
      if input_dims and "y" in input_dims:
          ds1 = ds1.assign_coords(
              y=da.arange(input_shape[-2], chunks=85)
          )
      if input_dims and "x" in input_dims:
          ds1 = ds1.assign_coords(
              x=da.arange(input_shape[-1], chunks=85)
          )
      if input_dims and "bands" in input_dims:
          ds1 = ds1.assign_coords(
              bands=list("RGBA"[: ds1.sizes["bands"]])
          )
  
      input_proj_str = (
          "+proj=geos +lon_0=-95.0 +h=35786023.0 +a=6378137.0 "
          "+b=6356752.31414 +sweep=x +units=m +no_defs"
      )
      crs = CRS(input_proj_str)
      source = AreaDefinition(
          "test_target",
          "test_target",
          "test_target",
          crs,
          input_shape[1],  # width
          input_shape[0],  # height
          (-1000.0, -1500.0, 1000.0, 1500.0),
      )
      ds1.attrs["area"] = source
      ds1 = ds1.assign_coords(crs=crs)
  
      ds2 = ds1.copy()
      input_area_shape = tuple(
          ds1.sizes[dim] for dim in ds1.dims if dim in ["y", "x"]
      )
      geo_dims = ("y", "x") if input_dims else None
      lons = da.random.random(input_area_shape, chunks=50)
      lats = da.random.random(input_area_shape, chunks=50)
      swath_def = SwathDefinition(
          DataArray(lons, dims=geo_dims), DataArray(lats, dims=geo_dims)
      )
      ds2.attrs["area"] = swath_def
      crs = CRS.from_string("+proj=latlong +datum=WGS84 +ellps=WGS84")
      ds2 = ds2.assign_coords(crs=crs)
  
      # set up target definition
      output_proj_str = (
          "+proj=lcc +datum=WGS84 +ellps=WGS84 "
          "+lon_0=-95. +lat_0=25 +lat_1=25 +units=m +no_defs"
      )
      output_proj_str = output_proj or output_proj_str
      target = AreaDefinition(
          "test_target",
          "test_target",
          "test_target",
          CRS(output_proj_str),
          output_shape[1],  # width
          output_shape[0],  # height
          (-1000.0, -1500.0, 1000.0, 1500.0),
      )
      return ds1, source, ds2, swath_def, target
  
imports: import os
  import shutil
  import tempfile
  import unittest
  from unittest import mock
  import dask.array
  import numpy
  import pytest
  import xarray
  from pyproj import CRS
  from satpy.resample import NativeResampler
label_desc: Use image node_id 1 for calling a global function with example usage: get_test_data(input_shape, output_shape, output_proj, input_dims) and returns: ds1,  source,  ds2,  swath_def,  target