from typing import Sequence


def format_type_name(ctype):
    """
    Convert a type or list of types to a string
    """
    if isinstance(ctype, Sequence):
        return '[{}]'.format(', '.join(map(format_type_name, ctype)))
    elif ctype is None:
        return 'None'
    return ctype.__name__