input: Write a function to scrape photos and captions from a given website. The function should take a URL as input and return a list of tuples, where each tuple contains the photo URL and its corresponding caption. If there is no caption for a photo, it should return 'No caption' instead.
  
  from bs4 import BeautifulSoup
  import requests
  
  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'})
      photos_and_captions = []
  
      for image_div in image_divs:
          figure = image_div.find('figure')
          src = figure.find('img')['src']
          caption = figure.find('figcaption')
          if caption:
              photos_and_captions.append((src, caption.text))
          else:
              photos_and_captions.append((src, 'No caption'))
      
      return photos_and_captions
  
  assert scrape_photos_and_captions('https://example.com/webpage1') == [('photo1.jpg', 'Caption1'), ('photo2.jpg', 'No caption')]
  assert scrape_photos_and_captions('https://example.com/webpage2') == [('photoA.jpg', 'CaptionA'), ('photoB.jpg', 'CaptionB')]
  assert scrape_photos_and_captions('https://example.com/webpage3') == [('photoX.jpg', 'No caption'), ('photoY.jpg', 'No caption')]
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'})
      photos_and_captions = []
  
      for image_div in image_divs:
          figure = image_div.find('figure')
          src = figure.find('img')['src']
          caption = figure.find('figcaption')
          if caption:
              photos_and_captions.append((src, caption.text))
          else:
              photos_and_captions.append((src, 'No caption'))
      
      return photos_and_captions