input: def collect_all_links(url: str) -> list:
      """This function scrapes a webpage to collect all the links present in anchor tags.
      It uses the requests and BeautifulSoup libraries to achieve this. The function
      sends a GET request to the provided URL, parses the HTML content using BeautifulSoup,
      and then collects and returns all the href attributes found in 'a' tags.
      >>> collect_all_links("http://www.example.com/")
      ['/link1', '/link2', '/link3']
      """
      import requests as req
      from bs4 import BeautifulSoup
  
      # GET request
      r = req.get(url)
  
      # parse the downloaded homepage and grab all text
      soup = BeautifulSoup(r.text, "html.parser")
  
      # find and return all links
      links = [link.get('href') for link in soup.find_all('a')]
  
      return links
output:     return [link for link in links if link]