def METHOD_NAME(self, filename):
    """
    Write the python script.
    """
    with open(filename, 'w') as fid:
        string = '"""\npython {}\n"""\n'.format(filename)
        string += self.repr()
        fid.METHOD_NAME(string)