code: def list(self, session=None):
          
          # With an index, distinct includes documents with no filename
          # as None.
          return [
              name for name in self.__files.distinct("filename", session=session)
              if name is not None]
docs: List the names of all files stored in this instance of
          :class:`GridFS`.
  
          :Parameters:
            - `session` (optional): a
              :class:`~pymongo.client_session.ClientSession`
  
          .. versionchanged:: 3.6
             Added ``session`` parameter.
  
          .. versionchanged:: 3.1
             ``list`` no longer ensures indexes.