input: Write a function to parse a json-formatted string into a Python dictionary. The function should take the json string as input and return the corresponding dictionary. If the input string is not valid json, the function should return None.
  assert parse_json('{"name": "John","age": 30,"address": {"city": "New York","state": "NY"}}')=={'name': 'John', 'age': 30, 'address': {'city': 'New York', 'state': 'NY'}}
  assert parse_json('{"name": "Alice","age": 25}')=={'name': 'Alice', 'age': 25}
  assert parse_json('invalid_json')==None
  assert parse_json('[]')==[]
  assert parse_json('')==None
output: try:
      import json
      return json.loads(json_string)
  except json.JSONDecodeError:
      return None