python_modules/dagster/dagster/core/types/field_utils.py
def NamedSelector(name, fields, description=None, type_attributes=DEFAULT_TYPE_ATTRIBUTES):
    '''
    A :py:class`Selector` with a name, allowing it to be referenced by that name.
    
    Args:
        name (str):
        fields (Dict[str, Field])
    '''
    check.str_param(name, 'name')
    check_user_facing_fields_dict(fields, 'NamedSelector named "{}"'.format(name))

    class _NamedSelector(_ConfigSelector):
        def __init__(self):
            super(_NamedSelector, self).__init__(
                key=name,
                name=name,
                fields=fields,
                description=description,
                type_attributes=type_attributes,
            )

    return _NamedSelector
def NamedSelector(name, fields, description=None, type_attributes=DEFAULT_TYPE_ATTRIBUTES):
    '''
    A :py:class`Selector` with a name, allowing it to be referenced by that name.
    
    Args:
        name (str):
        fields (Dict[str, Field])
    '''
    check.str_param(name, 'name')
    check_user_facing_fields_dict(fields, 'NamedSelector named "{}"'.format(name))

    class _NamedSelector(_ConfigSelector):
        def __init__(self):
            super(_NamedSelector, self).__init__(
                key=name,
                name=name,
                fields=fields,
                description=description,
                type_attributes=type_attributes,
            )

    return _NamedSelector
A :py:class`Selector` with a name, allowing it to be referenced by that name.
    
    Args:
        name (str):
        fields (Dict[str, Field])