<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def edit(self, request, id):
 """Edit a gist The files in the gist a cloned to a temporary directory and passed to the default editor (defined by the EDITOR environmental variable). When the user exits the editor, they will be provided with a prompt to commit the changes, which will then be pushed to the remote. Arguments: request: an initial request object id: the gist identifier """

        with pushd(tempfile.gettempdir()):
            try:
                self.clone(id)
                with pushd(id):
                    files = [f for f in os.listdir('.') if os.path.isfile(f)]
                    quoted = ['"{}"'.format(f) for f in files]
                    os.system("{} {}".format(self.editor, ' '.join(quoted)))
                    os.system('git commit -av && git push')

            finally:
                shutil.rmtree(id)