def METHOD_NAME(self, path: Optional[str] = None) -> None:
    if path is None:
        con.print(json_as_terminal_tree(None, self.data, self.name))
    else:
        with open(path, "w", encoding="utf8") as f:
            rich.print(
                json_as_terminal_tree(None, self.data, self.name), file=f
            )