def TypeUrlToMessage(type_url):
 if (not type_url.startswith(TYPE_URL_PREFIX)):
  raise ValueError(('Type URL has to start with a prefix %s: %s' % (TYPE_URL_PREFIX, type_url)))
 full_name = type_url[len(TYPE_URL_PREFIX):]
 try:
  return symbol_database.Default().GetSymbol(full_name)()
 except KeyError as e:
  raise ProtobufTypeNotFound(e.message)

def TypeUrlToMessage ( type_url ) : if ( not type_url . startswith ( TYPE_URL_PREFIX ) ) : raise ValueError ( ( 'Type URL has to start with a prefix %s: %s' % ( TYPE_URL_PREFIX , type_url ) ) ) full_name = type_url [ len ( TYPE_URL_PREFIX ) : ] try : return symbol_database . Default ( ) . GetSymbol ( full_name ) ( ) except KeyError as e : raise ProtobufTypeNotFound ( e . message )
returns a message instance corresponding to a given type url .