<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def pack_mac(macstr):
 	"""Converts a mac address given in colon delimited notation to a 	six byte string in network byte order. 	True 	Traceback (most recent call last):
 	ValueError: given mac addresses has an invalid number of colons 	@type macstr: str 	@rtype: bytes 	@raises ValueError: for badly formatted mac addresses 	"""

	if not isinstance(macstr, basestring):
		raise ValueError("given mac addresses is not a string")
	parts = macstr.split(":")
	if len(parts) != 6:
		raise ValueError("given mac addresses has an invalid number of colons")
	parts = [int(part, 16) for part in parts]  # raises ValueError
	return int_seq_to_bytes(parts)