input: Write a python function to fetch JSON data from a given URL.
  assert fetch_json('https://api.example.com/endpoint') == {'key1': 'value1', 'key2': 'value2'}
  assert fetch_json('https://api.example.com/another_endpoint') == {'another_key': 'another_value'}
  assert fetch_json('https://api.example.com/empty_endpoint') == {}
output: import requests
  
  def fetch_json(url):
      response = requests.get(url)
      return response.json()