class_docstr: Scheduler raising an exception if data are computed too many times.
class_docstr_tok: ["Scheduler","raising","an","exception","if","data","are","computed","too","many","times","."]
docstr: Compute dask task and keep track of number of times we do so.
docstr_tok: ["Compute","dask","task","and","keep","track","of","number","of","times","we","do","so","."]
code: def __call__(self, dsk, keys, **kwargs):
      """Compute dask task and keep track of number of times we do so."""
      import dask
  
      self.total_computes += 1
      if self.total_computes > self.max_computes:
          raise RuntimeError(
              "Too many dask computations were scheduled: "
              "{}".format(self.total_computes)
          )
      return dask.get(dsk, keys, **kwargs)
  
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 CustomScheduler obj's underlying member method code with example usage: obj.__call__(dsk, keys) and returns: dask