def METHOD_NAME(self, max_connections=None):
    args = {
        'addr': {
            'type': 'unix',
            'data': {'path': nbd_sock}
        }
    }
    if max_connections is not None:
        args['max-connections'] = max_connections
    result = self.vm.qmp('nbd-server-start', args)
    self.assert_qmp(result, 'return', {})
    yield
    result = self.vm.qmp('nbd-server-stop')
    self.assert_qmp(result, 'return', {})