def with_addon(allow_missing=False):
    def wrapper(fn):
        @functools.wraps(fn)
        def inner(view, request, guid=None, **kwargs):
            try:
                addon = Addon.unfiltered.get(guid=guid)
            except Addon.DoesNotExist:
                if allow_missing:
                    addon = None
                else:
                    return Response({'error': _('Could not find add-on with '
                                                'id "{}".').format(guid)},
                                    status=status.HTTP_404_NOT_FOUND)
            # Call the view if there is no add-on, the current user is an
            # auther of the add-on or the current user is an admin and the
            # request is a GET.
            if addon is None or (
                    addon.has_author(request.user)
                    or (request.method == 'GET'
                        and acl.action_allowed_user(request.user, 'Addons',
                                                    'Edit'))):
                return fn(view, request, addon=addon, **kwargs)
            else:
                return Response(
                    {'error': _('You do not own this addon.')},
                    status=status.HTTP_403_FORBIDDEN)
        return inner
    return wrapper
Gets the metric values from a specific commit.
dataset/ETHPy150Open mozilla/addons-server/src/olympia/signing/views.py/with_addon--crossover with--dataset/ETHPy150Open Yelp/git-code-debt/git_code_debt/logic.py/get_metric_values