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","."]
docstr: Looks up the registered object using the predicate.
  
  Args:
    obj: Object to pass to each of the registered predicates to look up the
      registered object.
  Returns:
    The object registered with the first passing predicate.
  Raises:
    LookupError if the object does not match any of the predicate functions.
docstr_tok: ["Looks","up","the","registered","object","using","the","predicate",".","Args",":","obj",":","Object","to","pass","to","each","of","the","registered","predicates","to","look","up","the","registered","object",".","Returns",":","The","object","registered","with","the","first","passing","predicate",".","Raises",":","LookupError","if","the","object","does","not","match","any","of","the","predicate","functions","."]
code: def lookup(self, obj):
      """Looks up the registered object using the predicate.
  
      Args:
        obj: Object to pass to each of the registered predicates to look up the
          registered object.
      Returns:
        The object registered with the first passing predicate.
      Raises:
        LookupError if the object does not match any of the predicate functions.
      """
      return self._registered_map[self.get_registered_name(obj)]
  
imports: import collections
  import re
  from tensorflow.python.util import tf_inspect
label_desc: Use image node_id 4 for calling the _PredicateRegistry obj's underlying member method code with example usage: obj.lookup(obj) and returns: self