def parent_is_init():
 if (os.getppid() == 1):
  return True
 return False

def parent_is_init ( ) : if ( os . getppid ( ) == 1 ) : return True return False
check if parent is init check if the parent process is init .