input: Write a function to scrape photos and captions from a given website. The function should take the URL of the website as input and print the photo source and caption (if available) for each photo found on the page. If no caption is found, it should print "No caption". The function should use the BeautifulSoup library to parse the HTML and requests to fetch the webpage content.
  
  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
  assert scrape_photos_and_captions('https://nonexistentwebsite.com') != None
output: 
  def scrape_photos_and_captions(url):
      req = requests.get(url)
      html = req.text
      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')
  