class_docstr: Act as a modifier that performs different modifications.
class_docstr_tok: ["Act","as","a","modifier","that","performs","different","modifications","."]
docstr: Modify provided data depending on the modifier name and input data.
docstr_tok: ["Modify","provided","data","depending","on","the","modifier","name","and","input","data","."]
code: def __call__(self, datasets, optional_datasets=None, **kwargs):
      """Modify provided data depending on the modifier name and input data."""
      if self.attrs["optional_prerequisites"]:
          for opt_dep in self.attrs["optional_prerequisites"]:
              opt_dep_name = (
                  opt_dep
                  if isinstance(opt_dep, str)
                  else opt_dep.get("name", "")
              )
              if "NOPE" in opt_dep_name or "fail" in opt_dep_name:
                  continue
              assert optional_datasets is not None
              assert len(optional_datasets)
      resolution = datasets[0].attrs.get("resolution")
      mod_name = self.attrs["modifiers"][-1]
      data = datasets[0].data
      i = datasets[0].attrs.copy()
      if mod_name == "res_change" and resolution is not None:
          data = self._handle_res_change(datasets, i)
      elif "incomp_areas" in mod_name:
          raise IncompatibleAreas(
              "Test modifier 'incomp_areas' always raises IncompatibleAreas"
          )
      self.apply_modifier_info(datasets[0].attrs, i)
      return DataArray(
          data,
          dims=datasets[0].dims,
          # coords=datasets[0].coords,
          attrs=i,
      )
  
imports: from contextlib import contextmanager
  from datetime import datetime
  from typing import Any
  from unittest import mock
  import dask.array
  import numpy
  from pyresample import create_area_def
  from pyresample.geometry import BaseDefinition, SwathDefinition
  from xarray import DataArray
  from satpy import Scene
  from satpy.composites import GenericCompositor, IncompatibleAreas
  from satpy.dataset import DataID, DataQuery
  from satpy.dataset.dataid import default_id_keys_config, minimal_default_keys_config
  from satpy.modifiers import ModifierBase
  from satpy.readers.file_handlers import BaseFileHandler
label_desc: Use image node_id 2 for calling the FakeModifier obj's underlying member method code with example usage: obj.__call__(datasets, optional_datasets) and returns: DataArray