class_docstr: A base resource that represents a connection to a database.
  
  The method is_available() allows to check if the resource is available. It's not called automatically.
  
  Args:
      database (:obj:`str`): The name of the mongo database.
      host (:obj:`str`): The host of the mongo database. It must start with ``mongodb://`` or ``mongodb+srv://``.
      mongoengine_alias (:obj:`str`): The alias of the connection in mongoengine.
      server_selection_timeout_ms (:obj:`int`, `optional`, defaults to 30_000): The timeout in milliseconds for
          server selection.
code: def release(self) -> None:
      disconnect(alias=self.mongoengine_alias)
  
imports: from dataclasses import dataclass, field
  from types import TracebackType
  from typing import Any, Optional, TypeVar
  from mongoengine.connection import ConnectionFailure, connect, disconnect
  from pymongo import MongoClient
  from pymongo.errors import ServerSelectionTimeoutError
  from libcommon.constants import CACHE_MONGOENGINE_ALIAS, METRICS_MONGOENGINE_ALIAS, QUEUE_MONGOENGINE_ALIAS
label_desc: Use image node_id 5 for calling the MongoResource obj's underlying member method code with example usage: obj.release() without return types