input: Write a function to connect to a domain and fetch the contents of its homepage. The function should take a URL as input, attempt to fetch the content using the requests library, and print the content if the request is successful. If the request fails, the function should print an error message.
  assert fetch_homepage("https://www.example.com/")==None
  assert fetch_homepage("https://www.nonexistentexample.com/")==None
output: def fetch_homepage(url):
      import requests
      try:
          response = requests.get(url)
          response.raise_for_status()
          print(response.text)
      except requests.exceptions.RequestException as e:
          print(f"Error fetching {url}: {e}")