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):
      if self.param_hint is not None:
          param_hint = self.param_hint
      elif self.param is not None:
          param_hint = self.param.get_error_hint(self.ctx)
      else:
          param_hint = None
      param_hint = _join_param_hints(param_hint)
  
      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 += ".  {}".format(msg_extra)
              else:
                  msg = msg_extra
  
      return "Missing {}{}{}{}".format(
          param_type,
          " {}".format(param_hint) if param_hint else "",
          ".  " if msg else ".",
          msg or "",
      )
  
imports: from ._compat import filename_to_ui
  from ._compat import get_text_stderr
  from ._compat import PY2
  from .utils import echo
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: str