<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, new_email_address, name, access_level, password=None):
 """Updates the details for a person. Password is optional and is only updated if supplied."""

        params = {"email": self.email_address}
        body = {
            "EmailAddress": new_email_address,
            "Name": name,
            "AccessLevel": access_level,
            "Password": password}
        response = self._put("/clients/%s/people.json" % self.client_id,
                             body=json.dumps(body), params=params)
        # Update self.email_address, so this object can continue to be used
        # reliably
        self.email_address = new_email_address