<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update(self, updatePortalParameters, clearEmptyFields=False):
 """ The Update operation allows administrators only to update the organization information such as name, description, thumbnail, and featured groups. Inputs: updatePortalParamters - parameter.PortalParameters object that holds information to update clearEmptyFields - boolean that clears all whitespace from fields """

        url = self.root + "/update"
        params = {
            "f" : "json",
            "clearEmptyFields" : clearEmptyFields
        }
        if isinstance(updatePortalParameters, parameters.PortalParameters):
            params.update(updatePortalParameters.value)
        elif isinstance(updatePortalParameters, dict):
            for k,v in updatePortalParameters.items():
                params[k] = v
        else:
            raise AttributeError("updatePortalParameters must be of type parameter.PortalParameters")
        return self._post(url=url,
                             param_dict=params,
                             securityHandler=self._securityHandler,
                             proxy_url=self._proxy_url,
                             proxy_port=self._proxy_port)