def names(name_instance, fields=None):
    """Return of dict of name variations for the name class.

    Args:
        name_instance: BaseName subclass instance
        fields: list, limit the returned dict to include only elements whose
            keys are in this list.

    Returns:
        dict, example
            {
                'name_for_file': 'File Name',
                'name_for_search': 'Search Name',
                'name_for_url': 'Url Name',
            }
    """
    name_dict = {
        'name_for_file': name_instance.for_file(),
        'name_for_search': name_instance.for_search(),
        'name_for_url': name_instance.for_url(),
    }
    if fields is not None:
        name_dict = dict(
            [(x, name_dict[x]) for x in list(name_dict.keys()) if x in fields])
    return name_dict