class_docstr: Scope can't be mixed with names and ids.
  Scope with name should have length exactly 1.
  Scope with ids should have length exactly 1.
code: def check(self, scope: List[MapRegion]):
      if self._names is None and self._ids is None:
          assert len(scope) == 0
      elif self._names is not None:
          assert len(self._names) == len(scope)
          for expected_name, region in zip(self._names, scope):
              assert expected_name == MapRegion.name_or_none(region)
      elif self._ids is not None:
          for expected_id, region in zip(self._ids, scope):
              assert len(region.values) == 1
              assert expected_id == region.values[0]
      else:
          raise ValueError("Invalid matcher state")
  
imports: from typing import TypeVar, Generic, Optional, List, Union
  from lets_plot.geo_data.gis.geometry import GeoRect, GeoPoint
  from lets_plot.geo_data.geocodes import _ensure_is_list
  from lets_plot.geo_data.gis.request import Request, GeocodingRequest, RegionQuery, MapRegion, AmbiguityResolver, PayloadKind, MapRegionKind, IgnoringStrategyKind, LevelKind
label_desc: Use image node_id 5 for calling the ScopeMatcher obj's underlying member method code with example usage: obj.check(scope) without return types