input: Write a function to create a web scraper that extracts specific data from a given website using the BeautifulSoup package in Python. The function should parse webpages to find HTML elements using tags and attributes, and once the data is found, it should convert it into the desired format and store it.
  
  assert create_web_scraper("").find_all('a')== []
  assert create_web_scraper("https://example.com/").find_all('a') != []
  assert create_web_scraper("https://example.com/").find_all('img') != []
  assert create_web_scraper("https://example.com/").find_all('title') == ["Example Domain"]
output: def create_web_scraper(url):
      from bs4 import BeautifulSoup
      import requests
      
      def find_all(tag):
          response = requests.get(url)
          soup = BeautifulSoup(response.text, 'html.parser')
          elements = soup.find_all(tag)
          if tag == 'title':
              return [elements[0].get_text()] if elements else []
          return elements