def METHOD_NAME(self, req, resp, worker, dataset):
    # Make sure load balancers and other proxies do not cache this
    resp.cache_control = cache_control
    resp.set_header('Expires', expires)
    resp.set_header('WWW-Authenticate', 'Basic realm="dataset git repo"')
    if not _check_git_access(req, dataset):
        return _handle_failed_access(req, resp)
    if dataset:
        dataset_path = self.store.get_dataset_path(dataset)
        service = req.get_param('service', required=True)
        if service == 'git-receive-pack' or service == 'git-upload-pack':
            # Prefix is line length as hex followed by service name to start
            if service == 'git-receive-pack':
                prefix = b'001f# service=git-receive-pack\n0000'
            elif service == 'git-upload-pack':
                prefix = b'001e# service=git-upload-pack\n0000'
            # git-receive-pack or git-upload-pack handle the other requests
            with subprocess.Popen([service, '--advertise-refs', '--stateless-rpc', dataset_path], stdout=subprocess.PIPE) as process:
                resp.content_type = 'application/x-{}-advertisement'.format(
                    service)
                resp.body = prefix + process.stdout.read()
                resp.status = falcon.HTTP_OK
        else:
            resp.status = falcon.HTTP_UNPROCESSABLE_ENTITY
    else:
        resp.status = falcon.HTTP_UNPROCESSABLE_ENTITY