class_docstr: Index of resource scopes, where each entry is 'RESOURCE': 'SCOPE'
  
  Each resource may be scoped as local, global, or excluded. Any resources not
  specified are considered global.
code: def __init__(self, *args, **kwargs):
      self.data = dict(*args, **kwargs)
      valid_scopes = {"local", "global", "excluded"}
      if set(self.data.values()) - valid_scopes:
          invalid_res = [
              res
              for res, scope in self.data.items()
              if scope not in valid_scopes
          ]
          invalid_pairs = {res: self.data[res] for res in invalid_res}
  
          # For now, we don't want excluded in the documentation
          raise ResourceScopesException(
              "Invalid resource scopes: entries must be defined as RESOURCE=SCOPE "
              "pairs, where SCOPE is either 'local' or 'global'",
              invalid_pairs,
          )
  
imports: from collections import UserDict, defaultdict
  import itertools
  import operator
  import re
  import tempfile
  from snakemake.exceptions import ResourceScopesException, WorkflowError
  from snakemake.common.tbdstring import TBDString
label_desc: Use image node_id 1 to create a new ResourceScopes object from inherited base classes: UserDict with example: obj = ResourceScopes()