def get_dict(cls, key_field, *fields):
    """
        Retrieve as dict of {key_field: *fields} mapping. If `fields` is single value, returns `{key:value}` mapping.
                If `fields` is **tuple**, returns `{key: (tuple of fields value)}` mapping.
        :param key_field: name of Option field for dict key. Only `code` and `name` are available.
        :param fields: Names of Option field for values. Can be tuple or single value. Impact value part of return dict.
        :return: dict of {key_field: *fields} mapping.
        """
    if key_field not in ['code', 'name']:
        raise NameError(
            "'%s' is not correct key field. Only 'code' and 'name' can be key field."
             % str(key_field))
    if len(fields) == 0:
        raise ValueError('No fields argument found.')
    found_fields = set()
    for f in fields:
        if f not in ['code', 'name', 'text']:
            raise NameError(
                "'%s' is incorrect Option field. Only 'code', 'name' and 'text' are available."
                 % str(f))
        if f in found_fields:
            raise ValueError("Duplicated fields '%s' found." % str(f))
        found_fields.add(f)
    items = {}
    for o in cls.__get_name_options_mapping().values():
        key = getattr(o, key_field)
        value = []
        for f in fields:
            value.append(getattr(o, f))
        items[key] = value[0] if len(value) == 1 else tuple(value)
    return items
