<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_history_entry_record(endianess, hist_date_time_flag, tm_format, event_number_flag, hist_seq_nbr_flag, data):
 	""" 	Return data formatted into a log entry. 	:param str endianess: The endianess to use when packing values ('>' or '<') 	:param bool hist_date_time_flag: Whether or not a time stamp is included. 	:param int tm_format: The format that the data is packed in, this typically 	 corresponds with the value in the GEN_CONFIG_TBL (table #0) (1 <= tm_format <= 4) 	:param bool event_number_flag: Whether or not an event number is included. 	:param bool hist_seq_nbr_flag: Whether or not an history sequence number 	 is included. 	:param str data: The packed and machine-formatted data to parse 	:rtype: dict 	"""

	rcd = {}
	if hist_date_time_flag:
		tmstmp = format_ltime(endianess, tm_format, data[0:LTIME_LENGTH.get(tm_format)])
		if tmstmp:
			rcd['Time'] = tmstmp
		data = data[LTIME_LENGTH.get(tm_format):]
	if event_number_flag:
		rcd['Event Number'] = struct.unpack(endianess + 'H', data[:2])[0]
		data = data[2:]
	if hist_seq_nbr_flag:
		rcd['History Sequence Number'] = struct.unpack(endianess + 'H', data[:2])[0]
		data = data[2:]
	rcd['User ID'] = struct.unpack(endianess + 'H', data[:2])[0]
	rcd['Procedure Number'], rcd['Std vs Mfg'] = get_table_idbb_field(endianess, data[2:4])[:2]
	rcd['Arguments'] = data[4:]
	return rcd