class_docstr: Wrap MongoDB with three primary methods `read`, `write`, `remove`.
  
  Attributes
  ----------
  host : str
     Hostname or MongoDB compliant full credentials+address+database
     specification.
  
  Information on MongoDB `connection string
  <https://docs.mongodb.com/manual/reference/connection-string/>`_.
  
  .. seealso:: :class:`orion.core.io.database.Database` for more on attributes.
docstr: Convert generic `Database` sort orders to MongoDB ones.
docstr_tok: ["Convert","generic","`","Database","`","sort","orders","to","MongoDB","ones","."]
code: def _convert_sort_order(self, sort_order):
      """Convert generic `Database` sort orders to MongoDB ones."""
      if sort_order is self.ASCENDING:
          return pymongo.ASCENDING
      elif sort_order is self.DESCENDING:
          return pymongo.DESCENDING
      else:
          raise RuntimeError(
              f"Invalid database sort order {str(sort_order)}"
          )
  
imports: import functools
  import pymongo
  from orion.core.io.database import Database, DatabaseError, DatabaseTimeout, DuplicateKeyError
label_desc: Use image node_id 12 for calling the MongoDB obj's underlying member method code with example usage: obj._convert_sort_order(sort_order) and returns: pymongo, pymongo