input: Write a python function to fetch JSON data from a given URL and return it as a dictionary.
  ```python
  import requests
  
  def fetch_json_data(url):
      response = requests.get(url)
      return response.json()
  
  # Example usage:
  # url = "http://example.com/api/fetch"
  # data = fetch_json_data(url)
  # print(data)
  
  assert isinstance(fetch_json_data("http://jsonplaceholder.typicode.com/todos/1"), dict)
  assert 'userId' in fetch_json_data("http://jsonplaceholder.typicode.com/todos/1")
output: import requests
  
  def fetch_json_data(url):
      response = requests.get(url)
      response.raise_for_status()  # Raise an error on a bad status
      return response.json()
  
  # Example usage:
  # url = "http://example.com/api/fetch"
  # data = fetch_json_data(url)
  # print(data)
  
  assert isinstance(fetch_json_data("http://jsonplaceholder.typicode.com/todos/1"), dict)
  assert 'userId' in fetch_json_data("http://jsonplaceholder.typicode.com/todos/1")