nodes: 0, module; 1, function_definition; 2, function_name:kk_dict; 3, parameters; 4, block; 5, list_splat_pattern; 6, dictionary_splat_pattern; 7, expression_statement; 8, for_statement; 9, return_statement; 10, identifier:kk; 11, identifier:adict; 12, comment:"""
      Merges and defines dictionaries with values identical to keys.
  
      :param kk:
          A sequence of keys and/or dictionaries.
      :type kk: object | dict, optional
  
      :param adict:
          A dictionary.
      :type adict: dict, optional
  
      :return:
          Merged dictionary.
      :rtype: dict
  
      Example::
  
          >>> sorted(kk_dict('a', 'b', 'c').items())
          [('a', 'a'), ('b', 'b'), ('c', 'c')]
          
          >>> sorted(kk_dict('a', 'b', **{'a-c': 'c'}).items())
          [('a', 'a'), ('a-c', 'c'), ('b', 'b')]
          
          >>> sorted(kk_dict('a', {'b': 'c'}, 'c').items())
          [('a', 'a'), ('b', 'c'), ('c', 'c')]
          
          >>> sorted(kk_dict('a', 'b', **{'b': 'c'}).items())
          Traceback (most recent call last):
           ...
          ValueError: keyword argument repeated
          >>> sorted(kk_dict('a', {'b': 'd'}, **{'b': 'c'}).items())
          Traceback (most recent call last):
           ...
          ValueError: keyword argument repeated
      """; 13, identifier:k; 14, identifier:kk; 15, block; 16, identifier:adict; 17, if_statement; 18, call; 19, block; 20, elif_clause; 21, else_clause; 22, identifier:isinstance; 23, argument_list; 24, if_statement; 25, expression_statement; 26, comparison_operator:k in adict; 27, block; 28, block; 29, identifier:k; 30, identifier:dict; 31, not_operator; 32, block; 33, call; 34, identifier:k; 35, identifier:adict; 36, raise_statement; 37, expression_statement; 38, call; 39, raise_statement; 40, attribute; 41, argument_list; 42, call; 43, assignment; 44, attribute; 45, argument_list; 46, call; 47, identifier:adict; 48, identifier:update; 49, identifier:k; 50, identifier:ValueError; 51, argument_list; 52, subscript; 53, identifier:k; 54, call; 55, identifier:isdisjoint; 56, identifier:adict; 57, identifier:ValueError; 58, argument_list; 59, string; 60, identifier:adict; 61, identifier:k; 62, identifier:set; 63, argument_list; 64, string; 65, string_content:keyword argument repeated; 66, identifier:k; 67, string_content:keyword argument repeated
code: def kk_dict(*kk, **adict):
      """
      Merges and defines dictionaries with values identical to keys.
  
      :param kk:
          A sequence of keys and/or dictionaries.
      :type kk: object | dict, optional
  
      :param adict:
          A dictionary.
      :type adict: dict, optional
  
      :return:
          Merged dictionary.
      :rtype: dict
  
      Example::
  
          >>> sorted(kk_dict('a', 'b', 'c').items())
          [('a', 'a'), ('b', 'b'), ('c', 'c')]
          
          >>> sorted(kk_dict('a', 'b', **{'a-c': 'c'}).items())
          [('a', 'a'), ('a-c', 'c'), ('b', 'b')]
          
          >>> sorted(kk_dict('a', {'b': 'c'}, 'c').items())
          [('a', 'a'), ('b', 'c'), ('c', 'c')]
          
          >>> sorted(kk_dict('a', 'b', **{'b': 'c'}).items())
          Traceback (most recent call last):
           ...
          ValueError: keyword argument repeated
          >>> sorted(kk_dict('a', {'b': 'd'}, **{'b': 'c'}).items())
          Traceback (most recent call last):
           ...
          ValueError: keyword argument repeated
      """
  
      for k in kk:
          if isinstance(k, dict):
              if not set(k).isdisjoint(adict):
                  raise ValueError('keyword argument repeated')
              adict.update(k)
          elif k in adict:
              raise ValueError('keyword argument repeated')
          else:
              adict[k] = k
  
      return adict