def __init__(self, docs, version):
    '\n        Initialize from database documents.\n\n        :param docs: Database document.\n        :type docs: list[dict]\n        :param str version: The version number interpolated into ``{VERSION}``.\n        '
    if (not docs):
        _invalid('At least one user agent is required')
    self._user_agents = list()
    for (index, user_agent) in enumerate(docs):
        location = 'User agent #{}'.format((index + 1))
        if (user_agent.get('name', '').strip() == ''):
            _invalid('Name is required', location)
        self._user_agents.append(user_agent['name'].format(VERSION=version))
Initialize from database documents.

:param docs: Database document.
:type docs: list[dict]
:param str version: The version number interpolated into ``{VERSION}``.
def __init__(self, docs, version):
    '\n        Initialize from database documents.\n\n        :param docs: Database document.\n        :type docs: list[dict]\n        :param str version: The version number interpolated into ``{VERSION}``.\n        '
    if (not docs):
        _invalid('At least one user agent is required')
    self._user_agents = list()
    for (index, user_agent) in enumerate(docs):
        location = 'User agent #{}'.format((index + 1))
        if (user_agent.get('name', ).strip() == ):
            _invalid('Name is required', location)
        self._user_agents.append(user_agent['name'].format(VERSION=version))