<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_pretty_json(self, ignore_none: bool=True, ignore_empty: bool=False) -> str: """From instance to pretty json string :param ignore_none: Properties which is None are excluded if True :param ignore_empty: Properties which is empty are excluded if True :return: Json string Usage: { "favorites": [ { "name": "Apple", "names_by_lang": { "de": "Apfel", "en": "Apple" } }, { "name": "Orange" } ], "id": 1, "name": "Tom" } """

        return self.to_json(4, ignore_none, ignore_empty)