class_docstr: Registry with predicate-based lookup.
  
  See the documentation for `register_checkpoint_saver` and
  `register_serializable` for reasons why predicates are required over a
  class-based registry.
  
  Since this class is used for global registries, each object must be registered
  to unique names (an error is raised if there are naming conflicts). The lookup
  searches the predicates in reverse order, so that later-registered predicates
  are executed first.
class_docstr_tok: ["Registry","with","predicate-based","lookup",".","See","the","documentation","for","`","register_checkpoint_saver","`","and","`","register_serializable","`","for","reasons","why","predicates","are","required","over","a","class-based","registry",".","Since","this","class","is","used","for","global","registries",",","each","object","must","be","registered","to","unique","names","(","an","error","is","raised","if","there","are","naming","conflicts",")",".","The","lookup","searches","the","predicates","in","reverse","order",",","so","that","later-registered","predicates","are","executed","first","."]
code: def __init__(self, name):
      self._registry_name = name
      # Maps registered name -> object
      self._registered_map = {}
      # Maps registered name -> predicate
      self._registered_predicates = {}
      # Stores names in the order of registration
      self._registered_names = []
  
imports: import collections
  import re
  from tensorflow.python.util import tf_inspect
label_desc: Use image node_id 1 to create a new _PredicateRegistry object from inherited base classes: object with example: obj = _PredicateRegistry(name)