input: Write a function that scrapes a given website URL and collects all the links present on the webpage. The function should return a list of all the URLs found. If the URL is invalid or the webpage cannot be accessed, the function should return an empty list.
  
  def collect_links(url):
      try:
          # Make a GET request to the website
          response = requests.get(url)
          # Parse the content using BeautifulSoup
          soup = BeautifulSoup(response.content, 'html.parser')
          # Find all <a> tags and collect their 'href' attributes
          links = [a['href'] for a in soup.find_all('a', href=True)]
          return links
      except:
          return []
  
  assert collect_links('http://www.example.com/') == ['/page', '/another-page']
  assert collect_links('http://www.invalidurl.com/') == []
  assert collect_links('http://www.example.com/no-links') == []
  assert collect_links('http://www.example.com/many-links') == ['/link1', '/link2', '/link3']
  assert collect_links('') == []
output: def collect_links(url):
      try:
          response = requests.get(url)
          soup = BeautifulSoup(response.content, 'html.parser')
          links = [a['href'] for a in soup.find_all('a', href=True)]
          return links
      except:
          return []