

from __future__ import annotations

from collections.abc import Iterator





class 				__lowerCAmelCase  :




  def __init__(       self							,     lowerCAmelCase      )						->				None:
        '''simple docstring'''






        _lowercase			 =value
        _lowercase			 =None
        _lowercase			 =None





class 				__lowerCAmelCase  :




  def __init__(       self							,     lowerCAmelCase      )						->				None:
        '''simple docstring'''






        _lowercase			 =tree




  def 						A__  (       self							,     lowerCAmelCase      )						->				int:
        '''simple docstring'''






        if node is None:
              return 0
        return node.value + (
            self.depth_first_search(node.left      ) + self.depth_first_search(node.right      )
        )




  def __iter__(       self      )						->				Iterator[int]:
        '''simple docstring'''






        yield self.depth_first_search(self.tree      )


if __name__ == "__main__":
  import doctest

  doctest.testmod()





import requests

lowercase_             =     'YOUR API KEY'
def   a   (    A__			:     str   ,     A__			:     str = giphy_api_key  )					->   list:





      """simple docstring"""



      _lowercase			 ='+'.join(query.split()  )
      _lowercase			 =F'''https://api.giphy.com/v1/gifs/search?q={formatted_query}&api_key={api_key}'''
      _lowercase			 =requests.get(A__  ).json()['data']
      return [gif["url"] for gif in gifs]


if __name__ == "__main__":
  print('\n'.join(get_gifs('space ship')))


