'Renames the stored file with the specified file_id.
For example::
my_db = MongoClient().test
fs = GridFSBucket(my_db)
# Get _id of file to rename
file_id = fs.upload_from_stream("test_file", "data I want to store!")
fs.rename(file_id, "new_test_name")
Raises :exc:`~gridfs.errors.NoFile` if no file with file_id exists.
:Parameters:
- `file_id`: The _id of the file to be renamed.
- `new_filename`: The new name of the file.'

def rename(self, file_id, new_filename):

    result = self._files.update_one({'_id': file_id}, {'$set': {'filename': new_filename}})
    if (not result.matched_count):
        raise NoFile(('no    files    could    be    renamed    %r    because    none    matched    file_id    %i' % (new_filename, file_id)))
