parameters: (msg_context, msg_type, search_path)
return_statement: return spec
docstring: Load message specification for specified type.
  
      NOTE: this will register the message in the *msg_context*.
      
      :param msg_context: :class:`MsgContext` for finding loaded dependencies
      :param msg_type: relative or full message type.
      :param search_path: dictionary mapping message namespaces to a directory locations
  
      :returns: :class:`MsgSpec` instance, ``(str, MsgSpec)``
      :raises: :exc:`MsgNotFound` If message cannot be located.
docstring_summary: Load message specification for specified type.
docstring_tokens: Load message specification for specified type .
function: def load_msg_by_type(msg_context, msg_type, search_path):
      """
      Load message specification for specified type.
  
      NOTE: this will register the message in the *msg_context*.
      
      :param msg_context: :class:`MsgContext` for finding loaded dependencies
      :param msg_type: relative or full message type.
      :param search_path: dictionary mapping message namespaces to a directory locations
  
      :returns: :class:`MsgSpec` instance, ``(str, MsgSpec)``
      :raises: :exc:`MsgNotFound` If message cannot be located.
      """
      log("load_msg_by_type(%s, %s)" % (msg_type, str(search_path)))
      if not isinstance(search_path, dict):
          raise ValueError("search_path must be a dictionary of {namespace: dirpath}")
      if msg_type == HEADER:
          msg_type = HEADER_FULL_NAME
      package_name, base_type = package_resource_name(msg_type)
      file_path = get_msg_file(package_name, base_type, search_path)
      log("file_path", file_path)
  
      spec = load_msg_from_file(msg_context, file_path, msg_type)
      msg_context.set_file(msg_type, file_path)
      return spec
function_tokens: def load_msg_by_type ( msg_context , msg_type , search_path ) : log ( "load_msg_by_type(%s, %s)" % ( msg_type , str ( search_path ) ) ) if not isinstance ( search_path , dict ) : raise ValueError ( "search_path must be a dictionary of {namespace: dirpath}" ) if msg_type == HEADER : msg_type = HEADER_FULL_NAME package_name , base_type = package_resource_name ( msg_type ) file_path = get_msg_file ( package_name , base_type , search_path ) log ( "file_path" , file_path ) spec = load_msg_from_file ( msg_context , file_path , msg_type ) msg_context . set_file ( msg_type , file_path ) return spec