def METHOD_NAME(
    cls,
    host: str,
    port: int,
    db_name: Optional[str] = None,
) -> "MongoDBKVStore":
    """Load a MongoDBKVStore from a MongoDB host and port.
    Args:
        host (str): MongoDB host
        port (int): MongoDB port
        db_name (Optional[str]): MongoDB database name
    """
    try:
        from pymongo import MongoClient
    except ImportError:
        raise ImportError(IMPORT_ERROR_MSG)
    mongo_client: MongoClient = MongoClient(host, port)
    return cls(
        mongo_client=mongo_client,
        db_name=db_name,
        host=host,
        port=port,
    )