input: Write a function to parse a json-formatted string into a dictionary. If the input is a valid json string, the function should return the parsed dictionary. If not, it should raise a JSONDecodeError.
  import json
  data = '{"name": "John","age": 30,"address": {"city": "New York","state": "NY"}}'
  
  def parse_json_to_dict(data):
      return json.loads(data)
  
  assert parse_json_to_dict(data) == {"name": "John", "age": 30, "address": {"city": "New York", "state": "NY"}}
  assert parse_json_to_dict('{"invalid": "json}') # This should raise a JSONDecodeError
  assert parse_json_to_dict('{}') == {}
  assert parse_json_to_dict('[]') == []
output: def parse_json_to_dict(data):
      return json.loads(data)