Restart home assistant - Python

Hi All,

I am writing an appdaemon app (python code) that is used to configure home assistant. I would like to add features to:

  1. Check config file
  2. Restart home assistant

how do I go about this using python 3 code?
I have been trying with self.call_service('homeassistant.restart') obviously this is not right.
Any advise please?

Thanks!