class_docstr: A priority sorted registry.
  
  A `Registry` instance provides two public methods to alter the data of the
  registry: `register` and `deregister`. Use `register` to add items and
  `deregister` to remove items. See each method for specifics.
  
  When registering an item, a "name" and a "priority" must be provided. All
  items are automatically sorted by "priority" from highest to lowest. The
  "name" is used to remove ("deregister") and get items.
  
  A `Registry` instance it like a list (which maintains order) when reading
  data. You may iterate over the items, get an item and get a count (length)
  of all items. You may also check that the registry contains an item.
  
  When getting an item you may use either the index of the item or the
  string-based "name". For example:
  
      registry = Registry()
      registry.register(SomeItem(), 'itemname', 20)
      # Get the item by index
      item = registry[0]
      # Get the item by name
      item = registry['itemname']
  
  When checking that the registry contains an item, you may use either the
  string-based "name", or a reference to the actual item. For example:
  
      someitem = SomeItem()
      registry.register(someitem, 'itemname', 20)
      # Contains the name
      assert 'itemname' in registry
      # Contains the item instance
      assert someitem in registry
  
  The method `get_index_for_name` is also available to obtain the index of
  an item using that item's assigned "name".
code: def __iter__(self) -> Iterator[_T]:
      self._sort()
      return iter([self._data[k] for k, p in self._priority])
  
imports: from __future__ import annotations
  import re
  import sys
  import warnings
  from functools import wraps, lru_cache
  from itertools import count
  from typing import TYPE_CHECKING, Generic, Iterator, NamedTuple, TypeVar, TypedDict, overload
label_desc: Use image node_id 3 for calling the Registry obj's underlying member method code with example usage: obj.__iter__() and returns: iter