'''simple docstring'''

from typing import TYPE_CHECKING

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


lowerCAmelCase_ : str						  =      {
    "configuration_vision_text_dual_encoder": ["VisionTextDualEncoderConfig"],
    "processing_vision_text_dual_encoder": ["VisionTextDualEncoderProcessor"],
}


try:
       if not is_torch_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       lowerCAmelCase_ : Tuple						  =      ["VisionTextDualEncoderModel"]


try:
       if not is_flax_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       lowerCAmelCase_ : Optional[Any]						  =      ["FlaxVisionTextDualEncoderModel"]

try:
       if not is_tf_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       lowerCAmelCase_ : Tuple						  =      ["TFVisionTextDualEncoderModel"]


if TYPE_CHECKING:
       from .configuration_vision_text_dual_encoder import VisionTextDualEncoderConfig
       from .processing_vision_text_dual_encoder import VisionTextDualEncoderProcessor

       try:
              if not is_torch_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_vision_text_dual_encoder import VisionTextDualEncoderModel

       try:
              if not is_flax_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_flax_vision_text_dual_encoder import FlaxVisionTextDualEncoderModel

       try:
              if not is_tf_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_tf_vision_text_dual_encoder import TFVisionTextDualEncoderModel


else:
       import sys

       lowerCAmelCase_ : Optional[int]						  =      _LazyModule(__name__, globals()["__file__"], _import_structure)







'''simple docstring'''

def __a (	__lowerCamelCase			:						list[int] ,		__lowerCamelCase			:						int				)	->							bool:
      '''simple docstring'''


      lowercase_     =      len(__lowerCamelCase				)
      lowercase_     =      [[False] * (required_sum + 1) for _ in range(arr_len + 1				)]

      # for each arr value, a sum of zero(0) can be formed by not taking any element
      # hence True/1
      for i in range(arr_len + 1				):
            lowercase_     =      True

      # sum is not zero and set is empty then false
      for i in range(1 ,		required_sum + 1				):
            lowercase_     =      False

      for i in range(1 ,		arr_len + 1				):
            for j in range(1 ,		required_sum + 1				):
                  if arr[i - 1] > j:
                        lowercase_     =      subset[i - 1][j]
                  if arr[i - 1] <= j:
                        lowercase_     =      subset[i - 1][j] or subset[i - 1][j - arr[i - 1]]

      return subset[arr_len][required_sum]


if __name__ == "__main__":
       import doctest

       doctest.testmod()






