<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def editprojecthook(self, project_id, hook_id, url, push=False, issues=False, merge_requests=False, tag_push=False):
 """ edit an existing hook from a project :param id_: project id :param hook_id: hook id :param url: the new url :return: True if success """

        data = {
            "id": project_id,
            "hook_id": hook_id,
            "url": url,
            'push_events': int(bool(push)),
            'issues_events': int(bool(issues)),
            'merge_requests_events': int(bool(merge_requests)),
            'tag_push_events': int(bool(tag_push)),
        }

        request = requests.put(
            '{0}/{1}/hooks/{2}'.format(self.projects_url, project_id, hook_id),
            headers=self.headers, data=data, verify=self.verify_ssl, auth=self.auth, timeout=self.timeout)

        if request.status_code == 200:
            return True
        else:
            return False