nodes: 0, module; 1, function_definition; 2, function_name:_getkey; 3, parameters; 4, block; 5, identifier:self; 6, identifier:args; 7, identifier:kwargs; 8, expression_statement; 9, expression_statement; 10, expression_statement; 11, for_statement; 12, expression_statement; 13, return_statement; 14, comment:"""Get hash key from args and kwargs.
  
          args and kwargs must be hashable.
  
          :param tuple args: called vargs.
          :param dict kwargs: called keywords.
          :return: hash(tuple(args) + tuple((key, val) for key in sorted(kwargs)).
          :rtype: int."""; 15, assignment; 16, assignment; 17, identifier:key; 18, identifier:keys; 19, block; 20, assignment; 21, identifier:result; 22, identifier:values; 23, call; 24, identifier:keys; 25, call; 26, expression_statement; 27, identifier:result; 28, call; 29, identifier:list; 30, argument_list; 31, identifier:sorted; 32, argument_list; 33, call; 34, identifier:hash; 35, argument_list; 36, identifier:args; 37, call; 38, attribute; 39, argument_list; 40, call; 41, identifier:list; 42, argument_list; 43, identifier:values; 44, identifier:append; 45, tuple; 46, identifier:tuple; 47, argument_list; 48, identifier:kwargs; 49, identifier:key; 50, subscript; 51, identifier:values; 52, identifier:kwargs; 53, identifier:key
code: def _getkey(self, args, kwargs):
          """Get hash key from args and kwargs.
  
          args and kwargs must be hashable.
  
          :param tuple args: called vargs.
          :param dict kwargs: called keywords.
          :return: hash(tuple(args) + tuple((key, val) for key in sorted(kwargs)).
          :rtype: int."""
  
          values = list(args)
  
          keys = sorted(list(kwargs))
  
          for key in keys:
              values.append((key, kwargs[key]))
  
          result = hash(tuple(values))
  
          return result