input: Write a python function to convert a nested dictionary into a JSON string with indentation.
  assert convert_to_json({'name': 'root', 'children': [{'name': 'a', 'children': [{'name': 'b', 'children': []}]}]}) == '{\n    "name": "root",\n    "children": [\n        {\n            "name": "a",\n            "children": [\n                {\n                    "name": "b",\n                    "children": []\n                }\n            ]\n        }\n    ]\n}'
  assert convert_to_json({'key': 'value', 'list': [1, 2, 3]}) == '{\n    "key": "value",\n    "list": [\n        1,\n        2,\n        3\n    ]\n}'
  assert convert_to_json({'empty_dict': {}, 'empty_list': []}) == '{\n    "empty_dict": {},\n    "empty_list": []\n}'
output: import json
  
  def convert_to_json(nested_dict):
      return json.dumps(nested_dict, indent=4)