<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def protectbranch(self, project_id, branch):
 """ Protect a branch from changes :param project_id: project id :param branch: branch id :return: True if success """

        request = requests.put(
            '{0}/{1}/repository/branches/{2}/protect'.format(self.projects_url, project_id, branch),
            headers=self.headers, verify=self.verify_ssl, auth=self.auth, timeout=self.timeout)

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