

'''simple docstring'''




from typing import TYPE_CHECKING

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


_a			:	Optional[Any]								=  {'configuration_hubert': ['HUBERT_PRETRAINED_CONFIG_ARCHIVE_MAP', 'HubertConfig']}

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  _a			:	Optional[int]								=  [
      'HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST',
      'HubertForCTC',
      'HubertForSequenceClassification',
      'HubertModel',
      'HubertPreTrainedModel',
  ]


try:
  if not is_tf_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  _a			:	Dict								=  [
      'TF_HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST',
      'TFHubertForCTC',
      'TFHubertModel',
      'TFHubertPreTrainedModel',
  ]

if TYPE_CHECKING:
  from .configuration_hubert import HUBERT_PRETRAINED_CONFIG_ARCHIVE_MAP, HubertConfig

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_hubert import (
        HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
        HubertForCTC,
        HubertForSequenceClassification,
        HubertModel,
        HubertPreTrainedModel,
    )

  try:
    if not is_tf_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_tf_hubert import (
        TF_HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
        TFHubertForCTC,
        TFHubertModel,
        TFHubertPreTrainedModel,
    )


else:
  import sys

  _a			:	Tuple								=  _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)





'''simple docstring'''




from typing import TypeVar

from .arrow_dataset import Dataset, _split_by_node_map_style_dataset
from .iterable_dataset import IterableDataset, _split_by_node_iterable_dataset


_a			:	Optional[int]								=  TypeVar('DatasetType', Dataset, IterableDataset)


def  lowerCamelCase__						(  SCREAMING_SNAKE_CASE :				DatasetType    ,				SCREAMING_SNAKE_CASE :				int    ,				SCREAMING_SNAKE_CASE :				int  ):
  if isinstance(SCREAMING_SNAKE_CASE    ,				SCREAMING_SNAKE_CASE  ):
    return _split_by_node_map_style_dataset(SCREAMING_SNAKE_CASE    ,				rank=SCREAMING_SNAKE_CASE    ,				world_size=SCREAMING_SNAKE_CASE  )
  else:
    return _split_by_node_iterable_dataset(SCREAMING_SNAKE_CASE    ,				rank=SCREAMING_SNAKE_CASE    ,				world_size=SCREAMING_SNAKE_CASE  )


