input: Write a function to scrape a given website and extract relevant information. The function should take the URL of the website as input and return the scraped data in a structured format. Ensure that the function handles errors gracefully, such as handling invalid URLs or network issues.
  def scrape_website(url):
      import requests
      from bs4 import BeautifulSoup
      
      try:
          page = requests.get(url)
          soup = BeautifulSoup(page.text, 'html.parser')
          # Scraping code goes here....
          return scraped_data
      except Exception as e:
          return str(e)
  
  assert scrape_website('https://www.example.com') == <expected data>
  assert scrape_website('https://invalid-url.com') == 'Invalid URL'
  assert scrape_website('https://nonexistent-url.com') == 'Network error'
output: def scrape_website(url):
      import requests
      from bs4 import BeautifulSoup
      
      try:
          page = requests.get(url)
          if page.status_code != 200:
              return 'Network error'
          soup = BeautifulSoup(page.text, 'html.parser')
          # Example scraping code:
          scraped_data = {}
          scraped_data['title'] = soup.title.string
          scraped_data['paragraphs'] = [p.text for p in soup.find_all('p')]
          return scraped_data
      except requests.exceptions.RequestException as e:
          return 'Network error'
      except requests.exceptions.InvalidURL as e:
          return 'Invalid URL'
      except Exception as e:
          return str(e)