nodes: 0, module; 1, function_definition; 2, function_name:GetOrderKey; 3, parameters; 4, block; 5, identifier:self; 6, expression_statement; 7, expression_statement; 8, expression_statement; 9, expression_statement; 10, expression_statement; 11, for_statement; 12, return_statement; 13, comment:"""Return a tuple that can be used to sort problems into a consistent order.
  
      Returns:
        A list of values.
      """; 14, assignment; 15, call; 16, call; 17, assignment; 18, identifier:context_attribute; 19, identifier:context_attributes; 20, block; 21, identifier:tokens; 22, identifier:context_attributes; 23, list; 24, attribute; 25, argument_list; 26, attribute; 27, argument_list; 28, identifier:tokens; 29, list; 30, expression_statement; 31, string; 32, identifier:context_attributes; 33, identifier:extend; 34, attribute; 35, identifier:context_attributes; 36, identifier:extend; 37, call; 38, call; 39, string_content:_type; 40, identifier:ExceptionWithContext; 41, identifier:CONTEXT_PARTS; 42, attribute; 43, argument_list; 44, attribute; 45, argument_list; 46, identifier:self; 47, identifier:_GetExtraOrderAttributes; 48, identifier:tokens; 49, identifier:append; 50, call; 51, identifier:getattr; 52, argument_list; 53, identifier:self; 54, identifier:context_attribute; 55, None
code: def GetOrderKey(self):
      """Return a tuple that can be used to sort problems into a consistent order.
  
      Returns:
        A list of values.
      """
      context_attributes = ['_type']
      context_attributes.extend(ExceptionWithContext.CONTEXT_PARTS)
      context_attributes.extend(self._GetExtraOrderAttributes())
  
      tokens = []
      for context_attribute in context_attributes:
        tokens.append(getattr(self, context_attribute, None))
      return tokens