class_docstr: Raised if click required an option or argument but it was not
  provided when invoking the script.
  
  .. versionadded:: 4.0
  
  :param param_type: a string that indicates the type of the parameter.
                     The default is to inherit the parameter type from
                     the given `param`.  Valid values are ``'parameter'``,
                     ``'option'`` or ``'argument'``.
class_docstr_tok: ["Raised","if","click","required","an","option","or","argument","but","it","was","not","provided","when","invoking","the","script",".","..","versionadded",":",":","4.0",":","param","param_type",":","a","string","that","indicates","the","type","of","the","parameter",".","The","default","is","to","inherit","the","parameter","type","from","the","given","`","param","`",".","Valid","values","are","``","'parameter","'","``",",","``","'option","'","``","or","``","'argument","'","``","."]
code: def format_message(self) -> str:
      if self.param_hint is not None:
          param_hint: t.Optional[str] = self.param_hint
      elif self.param is not None:
          param_hint = self.param.get_error_hint(self.ctx)  # type: ignore
      else:
          param_hint = None
  
      param_hint = _join_param_hints(param_hint)
      param_hint = f" {param_hint}" if param_hint else ""
  
      param_type = self.param_type
      if param_type is None and self.param is not None:
          param_type = self.param.param_type_name
  
      msg = self.message
      if self.param is not None:
          msg_extra = self.param.type.get_missing_message(self.param)
          if msg_extra:
              if msg:
                  msg += f". {msg_extra}"
              else:
                  msg = msg_extra
  
      msg = f" {msg}" if msg else ""
  
      # Translate param_type for known types.
      if param_type == "argument":
          missing = _("Missing argument")
      elif param_type == "option":
          missing = _("Missing option")
      elif param_type == "parameter":
          missing = _("Missing parameter")
      else:
          missing = _("Missing {param_type}").format(
              param_type=param_type
          )
  
      return f"{missing}{param_hint}.{msg}"
  
imports: import typing
  from gettext import gettext
  from gettext import ngettext
  from ._compat import get_text_stderr
  from .utils import echo
  from .utils import format_filename
label_desc: Use image node_id 2 for calling the MissingParameter obj's underlying member method code with example usage: obj.format_message() and returns: missing, param_hint, str, msg