nodes: 0, module; 1, function_definition; 2, function_name:uuid; 3, parameters; 4, block; 5, identifier:source; 6, default_parameter; 7, default_parameter; 8, default_parameter; 9, expression_statement; 10, if_statement; 11, if_statement; 12, if_statement; 13, expression_statement; 14, expression_statement; 15, expression_statement; 16, return_statement; 17, identifier:email; 18, None; 19, identifier:name; 20, None; 21, identifier:username; 22, None; 23, comment:"""Get the UUID related to the identity data.
  
      Based on the input data, the function will return the UUID associated
      to an identity. On this version, the UUID will be the SHA1 of
      "source:email:name:username" string. This string is case insensitive,
      which means same values for the input parameters in upper
      or lower case will produce the same UUID.
  
      The value of 'name' will converted to its unaccent form which means
      same values with accent or unnacent chars (i.e 'ö and o') will
      generate the same UUID.
  
      For instance, these combinations will produce the same UUID:
  
          ('scm', 'jsmith@example.com', 'John Smith', 'jsmith'),
          ('scm', 'jsmith@example,com', 'Jöhn Smith', 'jsmith'),
          ('scm', 'jsmith@example.com', 'John Smith', 'JSMITH'),
          ('scm', 'jsmith@example.com', 'john Smith', 'jsmith')
  
      :param source: data source
      :param email: email of the identity
      :param name: full name of the identity
      :param username: user name used by the identity
  
      :returns: a universal unique identifier for Sorting Hat
  
      :raises ValueError: when source is None or empty; each one of the
          parameters is None; parameters are empty.
      """; 24, comparison_operator:source is None; 25, block; 26, comparison_operator:source == ''; 27, block; 28, not_operator; 29, block; 30, assignment; 31, assignment; 32, assignment; 33, identifier:uuid_; 34, identifier:source; 35, None; 36, raise_statement; 37, identifier:source; 38, string; 39, raise_statement; 40, parenthesized_expression; 41, raise_statement; 42, identifier:s; 43, call; 44, identifier:sha1; 45, call; 46, identifier:uuid_; 47, call; 48, call; 49, call; 50, boolean_operator; 51, call; 52, attribute; 53, argument_list; 54, attribute; 55, argument_list; 56, attribute; 57, argument_list; 58, identifier:ValueError; 59, argument_list; 60, identifier:ValueError; 61, argument_list; 62, boolean_operator; 63, identifier:username; 64, identifier:ValueError; 65, argument_list; 66, call; 67, identifier:lower; 68, identifier:hashlib; 69, identifier:sha1; 70, call; 71, identifier:sha1; 72, identifier:hexdigest; 73, string:"source cannot be None"; 74, string:"source cannot be an empty string"; 75, identifier:email; 76, identifier:name; 77, string:"identity data cannot be None or empty"; 78, attribute; 79, argument_list; 80, attribute; 81, argument_list; 82, string; 83, identifier:join; 84, tuple; 85, identifier:s; 86, identifier:encode; 87, string; 88, keyword_argument; 89, string_content::; 90, call; 91, call; 92, call; 93, call; 94, string_content:UTF-8; 95, identifier:errors; 96, string:"surrogateescape"; 97, identifier:to_unicode; 98, argument_list; 99, identifier:to_unicode; 100, argument_list; 101, identifier:to_unicode; 102, argument_list; 103, identifier:to_unicode; 104, argument_list; 105, identifier:source; 106, identifier:email; 107, identifier:name; 108, keyword_argument; 109, identifier:username; 110, identifier:unaccent; 111, True
code: def uuid(source, email=None, name=None, username=None):
      """Get the UUID related to the identity data.
  
      Based on the input data, the function will return the UUID associated
      to an identity. On this version, the UUID will be the SHA1 of
      "source:email:name:username" string. This string is case insensitive,
      which means same values for the input parameters in upper
      or lower case will produce the same UUID.
  
      The value of 'name' will converted to its unaccent form which means
      same values with accent or unnacent chars (i.e 'ö and o') will
      generate the same UUID.
  
      For instance, these combinations will produce the same UUID:
  
          ('scm', 'jsmith@example.com', 'John Smith', 'jsmith'),
          ('scm', 'jsmith@example,com', 'Jöhn Smith', 'jsmith'),
          ('scm', 'jsmith@example.com', 'John Smith', 'JSMITH'),
          ('scm', 'jsmith@example.com', 'john Smith', 'jsmith')
  
      :param source: data source
      :param email: email of the identity
      :param name: full name of the identity
      :param username: user name used by the identity
  
      :returns: a universal unique identifier for Sorting Hat
  
      :raises ValueError: when source is None or empty; each one of the
          parameters is None; parameters are empty.
      """
      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_