


from packaging import version

from .import_utils import is_accelerate_available


if is_accelerate_available():
   import accelerate







def SCREAMING_SNAKE_CASE	(			__lowerCAmelCase				)    ->				Dict:
  if not is_accelerate_available():
    return method
  snake_case__						= version.parse(accelerate.__version__				).base_version
  if version.parse(__lowerCAmelCase				) < version.parse('''0.17.0'''				):
    return method

  def wrapper(self							,   *__lowerCAmelCase							,   **__lowerCAmelCase				):
    if hasattr(self							,   '''_hf_hook'''				) and hasattr(self._hf_hook							,   '''pre_forward'''				):
      self._hf_hook.pre_forward(self				)
    return method(self							,   *__lowerCAmelCase							,   **__lowerCAmelCase				)

  return wrapper


from typing import TYPE_CHECKING

from ....utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


SCREAMING_SNAKE_CASE			:						Optional[int]				  =		{
    """configuration_mctct""": ["""MCTCT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """MCTCTConfig"""],
    """feature_extraction_mctct""": ["""MCTCTFeatureExtractor"""],
    """processing_mctct""": ["""MCTCTProcessor"""],
}


try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  SCREAMING_SNAKE_CASE			:						Optional[Any]				  =		[
      """MCTCT_PRETRAINED_MODEL_ARCHIVE_LIST""",
      """MCTCTForCTC""",
      """MCTCTModel""",
      """MCTCTPreTrainedModel""",
  ]


if TYPE_CHECKING:
  from .configuration_mctct import MCTCT_PRETRAINED_CONFIG_ARCHIVE_MAP, MCTCTConfig
  from .feature_extraction_mctct import MCTCTFeatureExtractor
  from .processing_mctct import MCTCTProcessor

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_mctct import MCTCT_PRETRAINED_MODEL_ARCHIVE_LIST, MCTCTForCTC, MCTCTModel, MCTCTPreTrainedModel

else:
  import sys

  SCREAMING_SNAKE_CASE			:						Union[str, Any]				  =		_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)


