def METHOD_NAME(bases, via):
    "Get base classes of a type, only direct names are supported currently"
    bases_set = set()
    errors = []
    for base in bases:
        if isinstance(base, ast.Name):
            bases_set.add(base.id)
        else:
            errors.append('Unknown base: {} via {}'.format(base.__class__.__name__, via))
    return bases_set, errors