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
DUID is consisted of 10 hex numbers.

    0x00 + mac with last 3 hex + mac with 6 hex