def _unmangle_name(mangled_name, class_name):
    """Transform *mangled_name* (which is assumed to be a
    "_ClassName__internal" name) into an "__internal" name.

    :arg str mangled_name:
       a mangled "_ClassName__internal" member name
    :arg str class_name:
       name of the class where the (unmangled) name is defined
    :return:
       the transformed "__internal" name
    :rtype:
       str

    """
    return mangled_name.replace("_%s" % class_name.lstrip('_'), "")