<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def check(self, item_id):
 """Check if an analysis is complete :type item_id: int :param item_id: task_id to check. :rtype: bool :return: Boolean indicating if a report is done or not. """

        response = self._request("tasks/view/{id}".format(id=item_id))

        if response.status_code == 404:
            # probably an unknown task id
            return False

        try:
            content = json.loads(response.content.decode('utf-8'))
            status = content['task']["status"]
            if status == 'completed' or status == "reported":
                return True

        except ValueError as e:
            raise sandboxapi.SandboxError(e)

        return False