code: def GetOrderKey(self):
      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