'Drop a database.
Raises :class:`TypeError` if `name_or_database` is not an instance of
:class:`basestring` (:class:`str` in python 3) or
:class:`~pymongo.database.Database`.
:Parameters:
- `name_or_database`: the name of a database to drop, or a
:class:`~pymongo.database.Database` instance representing the
database to drop
.. note:: The :attr:`~pymongo.mongo_client.MongoClient.write_concern` of
this client is automatically applied to this operation when using
MongoDB >= 3.4.
.. versionchanged:: 3.4
Apply this client\'s write concern automatically to this operation
when connected to MongoDB >= 3.4.'

def drop_database(self, name_or_database):

    name = name_or_database
    if isinstance(name, database.Database):
        name = name.name
    if (not isinstance(name, string_type)):
        raise TypeError(('name_or_database    must    be    an    instance    of    %s    or    a    Database' % (string_type.__name__,)))
    self._purge_index(name)
    with self._socket_for_reads(ReadPreference.PRIMARY) as (sock_info, slave_ok):
        self[name]._command(sock_info, 'dropDatabase', slave_ok=slave_ok, read_preference=ReadPreference.PRIMARY, write_concern=self.write_concern, parse_write_concern_error=True)
