def body_disposition(self, msg):
        """
        Return the body-disposition properly formatted for returning as
        part of a BODYSTRUCTURE fetch.

         body disposition
            A parenthesized list, consisting of a disposition type
            string, followed by a parenthesized list of disposition
            attribute/value pairs as defined in [DISPOSITION].

        This is the 'content-disposition' of the message.

        Arguments:
        - `msg`: The message (or message sub-part) we are looking at
        """
        # If we have a content-disposition
        #
        if 'content-disposition' in msg:
            # XXX We are hard coding what we assume will be in
            # XXX content-disposition. This is doomed to eventual failure.
            #
            cd = msg.get_params(header='content-disposition')

            # if the content disposition does not have parameters then just
            # put 'NIL' for the parameter list, otherwise we have a list of
            # key/value pairs for the disposition list.
            #
            if len(cd) == 1:
                return '("%s" NIL)' % cd[0][0].upper()
            else:
                cdpl = []
                for k,v in cd[1:]:
                    cdpl.extend(['"%s" "%s"' % (k.upper(),v)])
                return '("%s" (%s))' % (cd[0][0].upper(), " ".join(cdpl))
        else:
            return "NIL"

    #######################################################################
    #
dataset/ETHPy150Open scanner/asimap/asimap/fetch.py/FetchAtt.body_disposition/original