code: def uuid(source, email=None, name=None, username=None):
      if source is None:
          raise ValueError("source cannot be None")
      if source == '':
          raise ValueError("source cannot be an empty string")
      if not (email or name or username):
          raise ValueError("identity data cannot be None or empty")
      s = ':'.join((to_unicode(source),
                    to_unicode(email),
                    to_unicode(name, unaccent=True),
                    to_unicode(username))).lower()
      sha1 = hashlib.sha1(s.encode('UTF-8', errors="surrogateescape"))
      uuid_ = sha1.hexdigest()
      return uuid_