docstr: Finds authentication method if provided.
  
  Parameters
  ----------
  api_version : str
      API version for authentication.
  
  Returns
  -------
  bool
      True if known authentication method is found.
      False otherwise.
  
  str
      Name of authentication method used by client.
      If empty no authentication required.
  
  (True, '') as result of this function means authentication
  is not needed.
docstr_tok: ["Finds","authentication","method","if","provided",".","Parameters","--","--","--","--","--","api_version",":","str","API","version","for","authentication",".","Returns","--","--","--","-","bool","True","if","known","authentication","method","is","found",".","False","otherwise",".","str","Name","of","authentication","method","used","by","client",".","If","empty","no","authentication","required",".","(","True",",","``",")","as","result","of","this","function","means","authentication","is","not","needed","."]
code: def _get_auth_method(self, api_version) -> (bool, str):
      """
      Finds authentication method if provided.
  
      Parameters
      ----------
      api_version : str
          API version for authentication.
  
      Returns
      -------
      bool
          True if known authentication method is found.
          False otherwise.
  
      str
          Name of authentication method used by client.
          If empty no authentication required.
  
      (True, '') as result of this function means authentication
      is not needed.
      """
      if (
          api_version
          not in self.settings[SettingsParameters.ApiVersions]
      ):
          self.logger.log(
              logging.CRITICAL, f'Unknown API version "{api_version}"'
          )
          return False, ""
  
      version_settings = self.settings[SettingsParameters.ApiVersions][
          api_version
      ]
      if "features" not in version_settings:
          self.logger.log(
              logging.INFO,
              f'No features configured for API "{api_version}"',
          )
          return True, ""
  
      features = version_settings["features"]
      if (
          "authentication" not in features
          or not features["authentication"]["required"]
      ):
          self.logger.log(
              logging.INFO,
              "Authentication is not a required feature for API "
              f'"{api_version}"',
          )
          return True, ""
  
      auth_feature = features["authentication"]
      if "methods" not in auth_feature:
          self.logger.log(
              logging.INFO,
              "Authentication method is not configured for API "
              f'"{api_version}"',
          )
  
      methods = auth_feature["methods"]
      if "basic-auth" in auth_feature["methods"]:
          return True, "basic-auth"
      # Add new methods here...
  
      # No known methods were found
      self.logger.log(
          logging.CRITICAL,
          f'Unknown authentication method(s) "{methods}" are configured '
          f'for API "{api_version}"',
      )
      return False, ""
  
imports: import base64
  import binascii
  import concurrent
  import json
  import logging
  import tornado.web
  from tabpy.tabpy_server.app.app_parameters import SettingsParameters
  from tabpy.tabpy_server.handlers.util import hash_password
  from tabpy.tabpy_server.handlers.util import AuthErrorStates
  import uuid
label_desc: Use image node_id 5 for calling the BaseHandler obj's underlying member method code with example usage: obj._get_auth_method(api_version) and returns: False,  str, False,  str, True,  str, True,  str, True,  str