code: def lookup(name):
      """Returns the TypeSpec that has been registered with name `name`."""
      if not isinstance(name, str):
          raise TypeError(
              "Expected `name` to be a string; got %r" % (name,)
          )
      if name not in _NAME_TO_TYPE_SPEC:
          raise ValueError(
              "No TypeSpec has been registered with name %r" % (name,)
          )
      return _NAME_TO_TYPE_SPEC[name]
  
imports: import re
  from tensorflow.python.types import internal
label_desc: Use image node_id 3 for calling a global function with example usage: lookup(name) and returns: _NAME_TO_TYPE_SPEC