class_docstr: Base class for all GluonTS exceptions.
class_docstr_tok: ["Base","class","for","all","GluonTS","exceptions","."]
code: def guard(cls, condition, *args, **kwargs):
      if not condition:
          raise cls(*args, **kwargs)
  
file_path: gluonts/src/gluonts/exceptions.py
imports: from typing import Any
  from gluonts.pydantic import ValidationError, display_errors
label_desc: Use image node_id 1 for calling the GluonTSException obj's underlying member method code with example usage: obj.guard(cls, condition) without return types