from ...configuration_utils import PretrainedConfig
from ...utils import logging


A     :  List[Any]					     = logging.get_logger(__name__)

A     :  Any					     = {
    "unc-nlp/lxmert-base-uncased": "https://huggingface.co/unc-nlp/lxmert-base-uncased/resolve/main/config.json",
}


class   lowerCamelCase					(_snake_case					):
  """simple docstring"""







  lowerCamelCase__     =						'''lxmert'''
  lowerCamelCase__     =						{}







  def __init__(							self :       int  ,     __magic_name__ :       Any=30_522  ,     __magic_name__ :       List[str]=768  ,     __magic_name__ :       Union[str, Any]=12  ,     __magic_name__ :       List[Any]=9_500  ,     __magic_name__ :       Any=1_600  ,     __magic_name__ :       Union[str, Any]=400  ,     __magic_name__ :       Tuple=3_072  ,     __magic_name__ :       Dict="gelu"  ,     __magic_name__ :       Tuple=0.1  ,     __magic_name__ :       Tuple=0.1  ,     __magic_name__ :       int=512  ,     __magic_name__ :       List[str]=2  ,     __magic_name__ :       List[str]=0.02  ,     __magic_name__ :       str=1e-12  ,     __magic_name__ :       str=9  ,     __magic_name__ :       int=5  ,     __magic_name__ :       Optional[int]=5  ,     __magic_name__ :       List[Any]=2_048  ,     __magic_name__ :       Any=4  ,     __magic_name__ :       Dict=6.67  ,     __magic_name__ :       Any=True  ,     __magic_name__ :       Union[str, Any]=True  ,     __magic_name__ :       Any=True  ,     __magic_name__ :       Tuple=True  ,     __magic_name__ :       Optional[Any]=True  ,     __magic_name__ :       Optional[int]=True  ,     __magic_name__ :       Tuple=True  ,     **__magic_name__ :       List[Any]  ,     )  ->	Dict:
        SCREAMING_SNAKE_CASE_          =  vocab_size
        SCREAMING_SNAKE_CASE_          =  hidden_size
        SCREAMING_SNAKE_CASE_          =  num_attention_heads
        SCREAMING_SNAKE_CASE_          =  hidden_act
        SCREAMING_SNAKE_CASE_          =  intermediate_size
        SCREAMING_SNAKE_CASE_          =  hidden_dropout_prob
        SCREAMING_SNAKE_CASE_          =  attention_probs_dropout_prob
        SCREAMING_SNAKE_CASE_          =  max_position_embeddings
        SCREAMING_SNAKE_CASE_          =  type_vocab_size
        SCREAMING_SNAKE_CASE_          =  initializer_range
        SCREAMING_SNAKE_CASE_          =  layer_norm_eps
        SCREAMING_SNAKE_CASE_          =  num_qa_labels
        SCREAMING_SNAKE_CASE_          =  num_object_labels
        SCREAMING_SNAKE_CASE_          =  num_attr_labels
        SCREAMING_SNAKE_CASE_          =  l_layers
        SCREAMING_SNAKE_CASE_          =  x_layers
        SCREAMING_SNAKE_CASE_          =  r_layers
        SCREAMING_SNAKE_CASE_          =  visual_feat_dim
        SCREAMING_SNAKE_CASE_          =  visual_pos_dim
        SCREAMING_SNAKE_CASE_          =  visual_loss_normalizer
        SCREAMING_SNAKE_CASE_          =  task_matched
        SCREAMING_SNAKE_CASE_          =  task_mask_lm
        SCREAMING_SNAKE_CASE_          =  task_obj_predict
        SCREAMING_SNAKE_CASE_          =  task_qa
        SCREAMING_SNAKE_CASE_          =  visual_obj_loss
        SCREAMING_SNAKE_CASE_          =  visual_attr_loss
        SCREAMING_SNAKE_CASE_          =  visual_feat_loss
        SCREAMING_SNAKE_CASE_          =  {"vision": r_layers, "cross_encoder": x_layers, "language": l_layers}
        super().__init__(**lowerCAmelCase__   )



from collections.abc import Callable


def      a__ (		__UpperCamelCase     ,      __UpperCamelCase     ,      __UpperCamelCase				):
      SCREAMING_SNAKE_CASE_          =  a
      SCREAMING_SNAKE_CASE_          =  b
      if function(__UpperCamelCase				) == 0:  # one of the a or b is a root for the function
            return a
      elif function(__UpperCamelCase				) == 0:
            return b
      elif (
          function(__UpperCamelCase				) * function(__UpperCamelCase				) > 0
      ):  # if none of these are root and they are both positive or negative,
            # then this algorithm can't find the root
            raise ValueError("could not find root in given interval."				)
      else:
            SCREAMING_SNAKE_CASE_          =  start + (end - start) / 2.0
            while abs(start - mid				) > 1_0**-7:  # until precisely equals to 10^-7
                  if function(__UpperCamelCase				) == 0:
                        return mid
                  elif function(__UpperCamelCase				) * function(__UpperCamelCase				) < 0:
                        SCREAMING_SNAKE_CASE_          =  mid
                  else:
                        SCREAMING_SNAKE_CASE_          =  mid
                  SCREAMING_SNAKE_CASE_          =  start + (end - start) / 2.0
            return mid


def      a__ (		__UpperCamelCase				):
      return x**3 - 2 * x - 5


if __name__ == "__main__":
      print(bisection(f, 1, 10_00))

      import doctest

      doctest.testmod()


