


'''simple docstring'''



from typing import TYPE_CHECKING

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


__UpperCAmelCase     :int												=  {
    "configuration_deformable_detr": ["DEFORMABLE_DETR_PRETRAINED_CONFIG_ARCHIVE_MAP", "DeformableDetrConfig"],
}

try:
      if not is_vision_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      __UpperCAmelCase     :Optional[Any]												=  ["DeformableDetrFeatureExtractor"]
      __UpperCAmelCase     :List[str]												=  ["DeformableDetrImageProcessor"]

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      __UpperCAmelCase     :Optional[Any]												=  [
          "DEFORMABLE_DETR_PRETRAINED_MODEL_ARCHIVE_LIST",
          "DeformableDetrForObjectDetection",
          "DeformableDetrModel",
          "DeformableDetrPreTrainedModel",
      ]


if TYPE_CHECKING:
      from .configuration_deformable_detr import DEFORMABLE_DETR_PRETRAINED_CONFIG_ARCHIVE_MAP, DeformableDetrConfig

      try:
            if not is_vision_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .feature_extraction_deformable_detr import DeformableDetrFeatureExtractor
            from .image_processing_deformable_detr import DeformableDetrImageProcessor

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_deformable_detr import (
                DEFORMABLE_DETR_PRETRAINED_MODEL_ARCHIVE_LIST,
                DeformableDetrForObjectDetection,
                DeformableDetrModel,
                DeformableDetrPreTrainedModel,
            )

else:
      import sys

      __UpperCAmelCase     :Optional[Any]												=  _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)



'''simple docstring'''



import re




def       _a      (		_lowercase   :      List[Any]    ):





     '''simple docstring'''






     def docstring_decorator(_lowercase   :      str    ):
          __UpperCAmelCase      :					Tuple    				=     fn.__doc__
          __UpperCAmelCase      :					Tuple    				=     func_doc.split('''\n'''    )
          __UpperCAmelCase      :					Optional[Any]    				=     0
          while i < len(_lowercase    ) and re.search(R'''^\s*Examples?:\s*$'''     ,   lines[i]    ) is None:
               i += 1
          if i < len(_lowercase    ):
               __UpperCAmelCase      :					Optional[int]    				=     example_docstring
               __UpperCAmelCase      :					Tuple    				=     '''\n'''.join(_lowercase    )
          else:
               raise ValueError(
                   F'The function {fn} should have an empty \'Examples:\' in its docstring as placeholder, '
                   F'current docstring is:\n{func_doc}'    )
          __UpperCAmelCase      :					Tuple    				=     func_doc
          return fn

     return docstring_decorator