






"""simple docstring"""




def 							lowerCAmelCase			(   UpperCamelCase_:				float       )							->				float:







  '''simple docstring'''







  return -num if num < 0 else num






def 							lowerCAmelCase			(   UpperCamelCase_:				list[int]       )							->				int:







  '''simple docstring'''







  if len(UpperCamelCase_       ) == 0:
    raise ValueError("abs_min() arg is an empty sequence"       )
  _a					      =						x[0]
  for i in x:
    if abs_val(UpperCamelCase_       ) < abs_val(UpperCamelCase_       ):
      _a					      =						i
  return j






def 							lowerCAmelCase			(   UpperCamelCase_:				list[int]       )							->				int:







  '''simple docstring'''







  if len(UpperCamelCase_       ) == 0:
    raise ValueError("abs_max() arg is an empty sequence"       )
  _a					      =						x[0]
  for i in x:
    if abs(UpperCamelCase_       ) > abs(UpperCamelCase_       ):
      _a					      =						i
  return j






def 							lowerCAmelCase			(   UpperCamelCase_:				list[int]       )							->				int:







  '''simple docstring'''







  if len(UpperCamelCase_       ) == 0:
    raise ValueError("abs_max_sort() arg is an empty sequence"       )
  return sorted(UpperCamelCase_  ,			key=UpperCamelCase_       )[-1]






def 							lowerCAmelCase			(   )							->				str:







  '''simple docstring'''







  assert abs_val(0       ) == 0
  assert abs_val(34       ) == 34
  assert abs_val(-100000000000       ) == 100000000000

  _a					      =						[-3, -1, 2, -11]
  assert abs_max(UpperCamelCase_       ) == -11
  assert abs_max_sort(UpperCamelCase_       ) == -11
  assert abs_min(UpperCamelCase_       ) == -1


if __name__ == "__main__":
     import doctest

     doctest.testmod()

     test_abs_val()
     print(abs_val(-34))  # --> 34










"""simple docstring"""




from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_sentencepiece_available,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


UpperCamelCase											=     {"""configuration_pegasus""": ["""PEGASUS_PRETRAINED_CONFIG_ARCHIVE_MAP""", """PegasusConfig"""]}

try:
     if not is_sentencepiece_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     UpperCamelCase											=     ["""PegasusTokenizer"""]

try:
     if not is_tokenizers_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     UpperCamelCase											=     ["""PegasusTokenizerFast"""]

try:
     if not is_torch_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     UpperCamelCase											=     [
         """PEGASUS_PRETRAINED_MODEL_ARCHIVE_LIST""",
         """PegasusForCausalLM""",
         """PegasusForConditionalGeneration""",
         """PegasusModel""",
         """PegasusPreTrainedModel""",
     ]

try:
     if not is_tf_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     UpperCamelCase											=     [
         """TFPegasusForConditionalGeneration""",
         """TFPegasusModel""",
         """TFPegasusPreTrainedModel""",
     ]

try:
     if not is_flax_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     UpperCamelCase											=     [
         """FlaxPegasusForConditionalGeneration""",
         """FlaxPegasusModel""",
         """FlaxPegasusPreTrainedModel""",
     ]


if TYPE_CHECKING:
     from .configuration_pegasus import PEGASUS_PRETRAINED_CONFIG_ARCHIVE_MAP, PegasusConfig

     try:
          if not is_sentencepiece_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .tokenization_pegasus import PegasusTokenizer

     try:
          if not is_tokenizers_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .tokenization_pegasus_fast import PegasusTokenizerFast

     try:
          if not is_torch_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_pegasus import (
              PEGASUS_PRETRAINED_MODEL_ARCHIVE_LIST,
              PegasusForCausalLM,
              PegasusForConditionalGeneration,
              PegasusModel,
              PegasusPreTrainedModel,
          )

     try:
          if not is_tf_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_tf_pegasus import TFPegasusForConditionalGeneration, TFPegasusModel, TFPegasusPreTrainedModel

     try:
          if not is_flax_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_flax_pegasus import (
              FlaxPegasusForConditionalGeneration,
              FlaxPegasusModel,
              FlaxPegasusPreTrainedModel,
          )

else:
     import sys

     UpperCamelCase											=     _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)


