@webapi_check_local_site
    @webapi_login_required
    @webapi_request_fields(
        required=dict({
            'screenshot_id': {
                'type': int,
                'description': 'The ID of the screenshot being commented on.',
            },
            'x': {
                'type': int,
                'description': 'The X location for the comment.',
            },
            'y': {
                'type': int,
                'description': 'The Y location for the comment.',
            },
            'w': {
                'type': int,
                'description': 'The width of the comment region.',
            },
            'h': {
                'type': int,
                'description': 'The height of the comment region.',
            },
        }, **BaseScreenshotCommentResource.REQUIRED_CREATE_FIELDS),
        optional=BaseScreenshotCommentResource.OPTIONAL_CREATE_FIELDS,
        allow_unknown=True,
    )
    def create(self, request, screenshot_id, *args, **kwargs):
        """Creates a screenshot comment on a review.

        This will create a new comment on a screenshot as part of a review.
        The comment contains text and dimensions for the area being commented
        on.
        """
        try:
            review_request = \
                resources.review_request.get_object(request, *args, **kwargs)
            review = resources.review.get_object(request, *args, **kwargs)
        except ObjectDoesNotExist:
            return DOES_NOT_EXIST

        if not resources.review.has_modify_permissions(request, review):
            return self.get_no_access_error(request)

        try:
            screenshot = Screenshot.objects.get(pk=screenshot_id,
                                                review_request=review_request)
        except __HOLE__:
            return INVALID_FORM_DATA, {
                'fields': {
                    'screenshot_id': ['This is not a valid screenshot ID'],
                }
            }

        new_comment = self.create_comment(
            review=review,
            screenshot=screenshot,
            fields=('screenshot', 'x', 'y', 'w', 'h'),
            **kwargs)
        review.screenshot_comments.add(new_comment)

        return 201, {
            self.item_result_key: new_comment,
        }
dataset/ETHPy150Open reviewboard/reviewboard/reviewboard/webapi/resources/review_screenshot_comment.py/ReviewScreenshotCommentResource.create