code: def database_names(self, session=None):
          
          warnings.warn("database_names is deprecated. Use list_database_names "
                        "instead.", DeprecationWarning, stacklevel=2)
          return self.list_database_names(session)
docs: **DEPRECATED**: Get a list of the names of all databases on the
          connected server.
  
          :Parameters:
            - `session` (optional): a
              :class:`~pymongo.client_session.ClientSession`.
  
          .. versionchanged:: 3.7
             Deprecated. Use :meth:`list_database_names` instead.
  
          .. versionchanged:: 3.6
             Added ``session`` parameter.