def get_class(name, default_class, map_class=None):
    """Return class based on default
        map_class
             if key == str -> value = class
             else: key = class -> list of strings
    """
    if map_class is None:
        map_class = {}
    klass = default_class
    if name is not None:
        try:
            klass = map_class[name]
        except:
            for k, v in map_class.items():
                if type(k) in (type,) and name in v:
                    klass = k
                    break
    return klass
