parameters: (data)
return_statement: return RequestHeader._make(struct.unpack(REQUEST_HEADER_FMT,
                                               data[MSG_TYPE_SIZE:end]))
docstring: Take a buffer and return a request header.
      Throws MsgError if type is not a request or struct.error if structure can't
      be unpacked.
docstring_summary: Take a buffer and return a request header.
      Throws MsgError if type is not a request or struct.error if structure can't
      be unpacked.
docstring_tokens: Take a buffer and return a request header . Throws MsgError if type is not a request or struct . error if structure can t be unpacked .
function: def unpack_request_header(data):
      """
      Take a buffer and return a request header.
      Throws MsgError if type is not a request or struct.error if structure can't
      be unpacked.
      """
      msg_type = unpack_msg_type(data)
      if msg_type != REQUEST_MSG_TYPE:
          raise MsgError("Expected a request message")
      end = REQUEST_HEADER_SIZE + MSG_TYPE_SIZE
      return RequestHeader._make(struct.unpack(REQUEST_HEADER_FMT,
                                               data[MSG_TYPE_SIZE:end]))
function_tokens: def unpack_request_header ( data ) : msg_type = unpack_msg_type ( data ) if msg_type != REQUEST_MSG_TYPE : raise MsgError ( "Expected a request message" ) end = REQUEST_HEADER_SIZE + MSG_TYPE_SIZE return RequestHeader . _make ( struct . unpack ( REQUEST_HEADER_FMT , data [ MSG_TYPE_SIZE : end ] ) )