code: def __init__(self, message: str):
      opts = ", ".join(
          ["`{}`".format(m.value) for m in list(enum.Method)]
      )
      self.message = (
          "The passed method `{}` is invalid. "
          "Valid methods are: {}.".format(message, opts)
      )
      super().__init__(self.message)
  
imports: from sklearn_porter import enums
label_desc: Use image node_id 1 to create a new InvalidMethodError object from inherited base classes: Exception with example: obj = InvalidMethodError(message)