def _import_string(names):
    """return a list of (name, asname) formatted as a string"""
    _names = []
    for name, asname in names:
        if asname is not None:
            _names.append("%s as %s" % (name, asname))
        else:
            _names.append(name)
    return ", ".join(_names)
return a list of (name, asname) formatted as a string