code: def list_database_names(self, session=None):
          
          return [doc["name"]
                  for doc in self.list_databases(session, nameOnly=True)]
docs: Get a list of the names of all databases on the connected server.
  
          :Parameters:
            - `session` (optional): a
              :class:`~pymongo.client_session.ClientSession`.
  
          .. versionadded:: 3.6