def METHOD_NAME(self, path: Path):
    """Function to write the script out to file.
    :return bool result: Returns either True for successfully writing the
                         file or False otherwise.
    """
    with path.open('w') as script_file:
        script_file.METHOD_NAME('\n'.join(self.header.get_lines()))
        script_file.METHOD_NAME('\n\n')
        script_file.METHOD_NAME('\n'.join(self._script_lines))
        script_file.METHOD_NAME('\n')
    # Make the file executable.
    path.chmod(path.stat().st_mode | 0o110)