def METHOD_NAME(self, script_path: Optional[str] = None) -> None:
    if script_path is None:
        script_path = self._script_path
    if script_path is None:
        raise Exception("Cannot write script. No path specified")
    with open(script_path, "w") as f:
        f.METHOD_NAME(self._script)
    os.chmod(script_path, 0o744)