class_docstr: Base class for configuration classes that need to respect the same API than PretrainedConfig but with a different
  configuration file name.
class_docstr_tok: ["Base","class","for","configuration","classes","that","need","to","respect","the","same","API","than","PretrainedConfig","but","with","a","different","configuration","file","name","."]
docstr: Get the configuration file to use for this version of transformers.
  
  Args:
      configuration_files (`List[str]`): The list of available configuration files.
  
  Returns:
      `str`: The configuration file to use.
docstr_tok: ["Get","the","configuration","file","to","use","for","this","version","of","transformers",".","Args",":","configuration_files","(","`","List","[","str","]","`",")",":","The","list","of","available","configuration","files",".","Returns",":","`","str","`",":","The","configuration","file","to","use","."]
code: def get_configuration_file(
      cls, configuration_files: List[str]
  ) -> str:
      """
      Get the configuration file to use for this version of transformers.
  
      Args:
          configuration_files (`List[str]`): The list of available configuration files.
  
      Returns:
          `str`: The configuration file to use.
      """
      configuration_files_map = {}
      _re_configuration_file = cls._re_configuration_file()
      for file_name in configuration_files:
          search = _re_configuration_file.search(file_name)
          if search is not None:
              v = search.groups()[0]
              configuration_files_map[v] = file_name
      available_versions = sorted(configuration_files_map.keys())
  
      # Defaults to FULL_CONFIGURATION_FILE and then try to look at some newer versions.
      configuration_file = cls.CONFIG_NAME
      optimum_version = version.parse(__version__)
      for v in available_versions:
          if version.parse(v) <= optimum_version:
              configuration_file = configuration_files_map[v]
          else:
              # No point going further since the versions are sorted.
              break
  
      return configuration_file
  
file_path: optimum/optimum/configuration_utils.py
imports: import copy
  import json
  import os
  import re
  from typing import Any, Dict, List, Tuple, Union
  from huggingface_hub import HfFolder
  from packaging import version
  from transformers import PretrainedConfig
  from transformers import __version__
  from .utils import logging
  from .version import __version__
label_desc: Use image node_id 3 for calling the BaseConfig obj's underlying member method code with example usage: obj.get_configuration_file(cls, configuration_files) and returns: configuration_file