input: Write a function to scrape photos and their captions from a given website using BeautifulSoup and requests. The function should accept the URL of the website as input, retrieve the HTML, parse it to find all images and their associated captions, and print them. If an image does not have a caption, it should print "No caption" instead.
  def scrape_photos_captions(url):
      from bs4 import BeautifulSoup
      import requests
  
      # 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_captions('https://example.com/webpage')
  assert scrape_photos_captions('https://example.com/anotherpage')
output: def scrape_photos_captions(url):
      from bs4 import BeautifulSoup
      import requests
  
      # 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')