input: Write a function to scrape photos and captions from a given website URL and print them out. The function should accept a URL as input, fetch the HTML content of the website, parse it using BeautifulSoup, and extract the image sources and captions from the specified HTML tags.
  from bs4 import BeautifulSoup
  import requests
  
  def scrape_photos_and_captions(url):
      # Get the HTML source code
      req = requests.get(url)
      html = req.text
  
      # Parse HTML source and extract photo and caption
      soup = BeautifulSoup(html, features='lxml')
      image_divs = soup.find_all('div', {'class': 'image-gallery__image'})
  
      for image_div in image_divs:
          figure = image_div.find('figure')
          src = figure.find('img')['src']
          caption = figure.find('figcaption')
          print('Photo: ', src)
          if caption:
              print('Caption: ', caption.text)
          else:
              print('No caption')
          print('\n')
  
  assert scrape_photos_and_captions('https://example.com/webpage') == None
output: 
  from bs4 import BeautifulSoup
  import requests
  
  def scrape_photos_and_captions(url):
      # Get the HTML source code
      req = requests.get(url)
      html = req.text
  
      # Parse HTML source and extract photo and caption
      soup = BeautifulSoup(html, features='lxml')
      image_divs = soup.find_all('div', {'class': 'image-gallery__image'})
  
      for image_div in image_divs:
          figure = image_div.find('figure')
          src = figure.find('img')['src']
          caption = figure.find('figcaption')
          print('Photo: ', src)
          if caption:
              print('Caption: ', caption.text)
          else:
              print('No caption')
          print('\n')
  