code: def GetConsistentValueOrRaise(self, error_format, context=None):
      
      if self.has_error:
        full_context = dict(self._context)
        if context: full_context.update(context)
        raise ValueError(error_format.format(**full_context))
      return self.value
docs: Gets consistent value or raises ValueError with formatted contexts.