import six


def _normalize_channels(*channels):
    """
    Converts a list of types, strings, or whatever else into a list of strings.

    >>> _normalize_channels()
    []

    >>> _normalize_channels('')
    []

    >>> _normalize_channels('   ')
    []

    >>> _normalize_channels(None)
    []

    >>> _normalize_channels('topic-one', 'topic-two')
    ['topic-one', 'topic-two']

    >>> _normalize_channels('repeated-topic', 'repeated-topic')
    ['repeated-topic']

    >>> _normalize_channels('topic-left', None, 'topic-right', None)
    ['topic-left', 'topic-right']

    >>> _normalize_channels('', 'topic-left', '', 'topic-right')
    ['topic-left', 'topic-right']

    >>> _normalize_channels('   ', '   topic-padded-left', '   ', 'topic-padded-right   ', '   ')
    ['topic-padded-left', 'topic-padded-right']

    >>> _normalize_channels(type)
    ['type']

    >>> _normalize_channels(dict)
    ['dict']

    >>> _normalize_channels(dict(foo="bar"))
    ["{'foo': 'bar'}"]
    """
    normalized_channels = []
    for topic in channels:
        if topic is not None:
            if isinstance(topic, type):
                normalized_channels.append(topic.__name__)
            elif isinstance(topic, six.string_types):
                topic = topic.strip()
                if topic != '':
                    normalized_channels.append(topic)
            else:
                normalized_channels.append(str(topic))
    return list(set(normalized_channels))