<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def generate_duid(mac):
 """DUID is consisted of 10 hex numbers. 0x00 + mac with last 3 hex + mac with 6 hex """

    valid = mac and isinstance(mac, six.string_types)
    if not valid:
        raise ValueError("Invalid argument was passed")
    return "00:" + mac[9:] + ":" + mac