"""simple docstring"""




from collections.abc import Callable





def 							SCREAMING_SNAKE_CASE     (			_lowerCamelCase						:       List[Any]			,_lowerCamelCase						:       str			,_lowerCamelCase						:       Optional[Any]	)       ->      Union[str, Any]:
  _lowerCAmelCase						:       float  			=     a
  _lowerCAmelCase						:       float  			=     b
  if function(snake_case__	) == 0:  # one of the a or b is a root for the function
    return a
  elif function(snake_case__	) == 0:
    return b
  elif (
      function(snake_case__	) * function(snake_case__	) > 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:
    _lowerCAmelCase						:       float  			=     start + (end - start) / 2.0
    while abs(start - mid	) > 10**-7:  # until precisely equals to 10^-7
      if function(snake_case__	) == 0:
        return mid
      elif function(snake_case__	) * function(snake_case__	) < 0:
        _lowerCAmelCase						:       Union[str, Any]  			=     mid
      else:
        _lowerCAmelCase						:       Optional[Any]  			=     mid
      _lowerCAmelCase						:       Optional[int]  			=     start + (end - start) / 2.0
    return mid





def 							SCREAMING_SNAKE_CASE     (			_lowerCamelCase						:       Any	)       ->      int:
  return x**3 - 2 * x - 5


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

     import doctest

     doctest.testmod()






'''simple docstring'''




import requests
from bsa import BeautifulSoup







def 		lowerCAmelCase_				(   snake_case__		,				snake_case__						):




    '''simple docstring'''



    A       :   str					=						BeautifulSoup(requests.get(snake_case__		,				params=snake_case__						).content		,				'''html.parser'''						)
    A       :   Dict					=						soup.find('''div'''		,				attrs={'''class''': '''gs_ri'''}						)
    A       :   Optional[int]					=						div.find('''div'''		,				attrs={'''class''': '''gs_fl'''}						).find_all('''a'''						)
    return anchors[2].get_text()


if __name__ == "__main__":
      lowercase			:				str    		=			{
          'title': (
              'Precisely geometry controlled microsupercapacitors for ultrahigh areal '
              'capacitance, volumetric capacitance, and energy density'
          ),
          'journal': 'Chem. Mater.',
          'volume': 30,
          'pages': '3979-3990',
          'year': 20_18,
          'hl': 'en',
      }
      print(get_citation('https://scholar.google.com/scholar_lookup', params=params))




