def NamedSelector(name, fields, description=None, type_attributes=DEFAULT_TYPE_ATTRIBUTES):
check.str_param(name, '<STR_LIT:name>')<EOL>check_user_facing_fields_dict(fields, '<STR_LIT>'.format(name))<EOL>class _NamedSelector(_ConfigSelector):<EOL><INDENT>def __init__(self):<EOL><INDENT>super(_NamedSelector, self).__init__(<EOL>key=name,<EOL>name=name,<EOL>fields=fields,<EOL>description=description,<EOL>type_attributes=type_attributes,<EOL>)<EOL><DEDENT><DEDENT>return _NamedSelector<EOL>
A :py:class`Selector` with a name, allowing it to be referenced by that name.

Args:
    name (str):
    fields (Dict[str, Field])