<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def query_license(self, preferred_locale, preferred_language, format_p):
 """Full feature version of the license attribute. in preferred_locale of type str The preferred license locale. Pass an empty string to get the default license. in preferred_language of type str The preferred license language. Pass an empty string to get the default language for the locale. in format_p of type str The license format: html, rtf or txt. If a license is present there will always be an HTML of it, the rich text format (RTF) and plain text (txt) versions are optional. If return license_text of type str The license text. """

        if not isinstance(preferred_locale, basestring):
            raise TypeError("preferred_locale can only be an instance of type basestring")
        if not isinstance(preferred_language, basestring):
            raise TypeError("preferred_language can only be an instance of type basestring")
        if not isinstance(format_p, basestring):
            raise TypeError("format_p can only be an instance of type basestring")
        license_text = self._call("queryLicense",
                     in_p=[preferred_locale, preferred_language, format_p])
        return license_text