code: def generate_duid(mac):
      
      valid = mac and isinstance(mac, six.string_types)
      if not valid:
          raise ValueError("Invalid argument was passed")
      return "00:" + mac[9:] + ":" + mac
docs: DUID is consisted of 10 hex numbers.
  
      0x00 + mac with last 3 hex + mac with 6 hex