class_docstr: Basic MONAILabel Client to invoke infer/train APIs over http/https
class_docstr_tok: ["Basic","MONAILabel","Client","to","invoke","infer\/train","APIs","over","http\/https"]
docstr: Get Next sample
  
  :param strategy: Name of strategy to be used for fetching next sample
  :param params: Additional JSON params as part of strategy request
  :return: json response which contains information about next image selected for annotation
docstr_tok: ["Get","Next","sample",":","param","strategy",":","Name","of","strategy","to","be","used","for","fetching","next","sample",":","param","params",":","Additional","JSON","params","as","part","of","strategy","request",":","return",":","json","response","which","contains","information","about","next","image","selected","for","annotation"]
code: def next_sample(self, strategy, params):
      """
      Get Next sample
  
      :param strategy: Name of strategy to be used for fetching next sample
      :param params: Additional JSON params as part of strategy request
      :return: json response which contains information about next image selected for annotation
      """
      params = self._update_client_id(params)
      selector = f"/activelearning/{MONAILabelUtils.urllib_quote_plus(strategy)}"
      status, response, _, _ = MONAILabelUtils.http_method(
          "POST",
          self._server_url,
          selector,
          params,
          headers=self._headers,
      )
      if status != 200:
          raise MONAILabelClientException(
              MONAILabelError.SERVER_ERROR,
              f"Status: {status}; Response: {bytes_to_str(response)}",
              status,
              response,
          )
  
      response = bytes_to_str(response)
      logging.debug(f"Response: {response}")
      return json.loads(response)
  
imports: import cgi
  import http.client
  import json
  import logging
  import mimetypes
  import os
  import re
  import ssl
  import tempfile
  from pathlib import Path
  from urllib.parse import quote_plus, unquote, urlencode, urlparse
  import requests
label_desc: Use image node_id 10 for calling the MONAILabelClient obj's underlying member method code with example usage: obj.next_sample(strategy, params) and returns: json