input: Write a python function to scrape product details such as link, price, and availability from an e-commerce webpage.
  assert isinstance(scrape("https://www.amazon.com/s?k=laptops&ref=nb_sb_noss_2"), list)
  assert all('Link' in product and 'Price' in product and 'Availability' in product for product in scrape("https://www.amazon.com/s?k=laptops&ref=nb_sb_noss_2"))
output: def scrape(url):
      import requests
      from bs4 import BeautifulSoup
  
      headers = {
          "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"
      }
      
      response = requests.get(url, headers=headers)
      soup = BeautifulSoup(response.content, "html.parser")
      
      products = []
      
      for item in soup.select(".s-main-slot .s-result-item"):
          link = item.select_one("h2 a")
          price_whole = item.select_one(".a-price-whole")
          price_fraction = item.select_one(".a-price-fraction")
          availability = item.select_one(".a-color-success")
          
          product = {}
          if link:
              product['Link'] = "https://www.amazon.com" + link["href"]
          if price_whole and price_fraction:
              product['Price'] = price_whole.text + price_fraction.text
          if availability:
              product['Availability'] = availability.text.strip()
          
          if product:
              products.append(product)
      
      return products