<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_user_properties(self, user_id, user_properties, headers=None, endpoint_url=None):
 """ Update a user's properties with values provided in "user_properties" dictionary :param str user_id: identified user's ID :param dict user_properties: user properties to update with a new values :param dict headers: custom request headers (if isn't set default values are used) :param str endpoint_url: where to send the request (if isn't set default value is used) :return: Response """

        endpoint_url = endpoint_url or self._endpoint_url

        url = endpoint_url + '/users/' + user_id + '/properties'
        headers = headers or self._default_headers()
        payload = user_properties

        response = requests.put(url, headers=headers, json=payload)

        return response