docstr: Type of errors that would be valid in Eager, but not supported in TorchDynamo.
  The error message should tell user about next actions.
  
  error_type: Type of user error
  msg: Actionable error message
  case_name: (Optional) Unique name (snake case) for the usage example in exportdb.
docstr_tok: ["Type","of","errors","that","would","be","valid","in","Eager",",","but","not","supported","in","TorchDynamo",".","The","error","message","should","tell","user","about","next","actions",".","error_type",":","Type","of","user","error","msg",":","Actionable","error","message","case_name",":","(","Optional",")","Unique","name","(","snake","case",")","for","the","usage","example","in","exportdb","."]
code: def __init__(self, error_type: UserErrorType, msg, case_name=None):
      """
      Type of errors that would be valid in Eager, but not supported in TorchDynamo.
      The error message should tell user about next actions.
  
      error_type: Type of user error
      msg: Actionable error message
      case_name: (Optional) Unique name (snake case) for the usage example in exportdb.
      """
      if case_name is not None:
          assert isinstance(case_name, str)
          if msg.endswith("."):
              msg += " "
          else:
              msg += "\n"
          msg += exportdb_error_message(case_name)
      super().__init__(msg)
      self.error_type = error_type
      self.message = msg
  
imports: import os
  import textwrap
  from enum import auto, Enum
  from traceback import extract_stack, format_exc, format_list, StackSummary
  from typing import cast, NoReturn, Optional
  import torch._guards
  from .None import config
  from .config import is_fbcode
  from .utils import counters
  import logging
label_desc: Use image node_id 1 to create a new UserError object from inherited base classes: Unsupported with example: obj = UserError(error_type, msg, case_name)