<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def updateSecurityPolicy(self, minLength=8, minUpper=None, minLower=None, minLetter=None, minDigit=None, minOther=None, expirationInDays=None, historySize=None):
 """updates the Portals security policy"""

        params = {
            "f" : "json",
            "minLength" : minLength,
            "minUpper": minUpper,
            "minLower": minLower,
            "minLetter": minLetter,
            "minDigit": minDigit,
            "minOther": minOther,
            "expirationInDays" : expirationInDays,
            "historySize": historySize
        }
        url = "%s/securityPolicy/update" % self.root
        return self._post(url=url,
                     param_dict=params,
                     securityHandler=self._securityHandler,
                     proxy_url=self._proxy_url,
                     proxy_port=self._proxy_port)