def get_project(self):
        if self.project:
            # project is already available
            return

        model_instance = self.url_pk_related_model.objects.get(pk=self.kwargs['pk'])

        if isinstance(model_instance, Project):
            self.project = model_instance
        elif isinstance(model_instance, Ticket):
            self.project = model_instance.project
        elif isinstance(model_instance, Log):
            self.project = model_instance.ticket.project
        else:
            raise ValueError
Verify github3.exceptions.UnprocessableResponseBody is raised.
dataset/ETHPy150Open trojkat/doner/doner/project/access_control_views.py/ProjectReletedView.get_project--crossover with--dataset/ETHPy150Open sigmavirus24/github3.py/tests/integration/test_repos_repo.py/TestRepository.test_refs_raises_unprocessable_exception