'Return the parameter value if found in the Content-Type header.
Optional failobj is the object to return if there is no Content-Type
header, or the Content-Type header has no such parameter.  Optional
header is the header to search instead of Content-Type.
Parameter keys are always compared case insensitively.  The return
value can either be a string, or a 3-tuple if the parameter was RFC
2231 encoded.  When it\'s a 3-tuple, the elements of the value are of
the form (CHARSET, LANGUAGE, VALUE).  Note that both CHARSET and
LANGUAGE can be None, in which case you should consider VALUE to be
encoded in the us-ascii charset.  You can usually ignore LANGUAGE.
Your application should be prepared to deal with 3-tuple return
values, and can convert the parameter to a Unicode string like so:
param = msg.get_param(\'foo\')
if isinstance(param, tuple):
param = unicode(param[2], param[0] or \'us-ascii\')
In any case, the parameter value (either the returned string, or the
VALUE item in the 3-tuple) is always unquoted, unless unquote is set
to False.'

def get_param(self, param, failobj=None, header='content-type', unquote=True):

    if (header not in self):
        return failobj
    for (k, v) in self._get_params_preserve(failobj, header):
        if (k.lower() == param.lower()):
            if unquote:
                return _unquotevalue(v)
            else:
                return v
    return failobj
