def _resolve_name(name, package, level):
    if not hasattr(package, 'rindex'):
        raise ValueError("'package' not set to a string")
    dot = len(package)
    for x in range(level, 1, -1):
        try:
            dot = package.rindex('.', 0, dot)
        except ValueError:
            raise ValueError("attempted relative import beyond top-level "
                              "package")
    return "%s.%s" % (package[:dot], name)
L{StringTransport.loseConnection} toggles the C{disconnecting} instance
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/utils/importlib.py/_resolve_name--crossover with--dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/test/test_stringtransport.py/StringTransportTests.test_loseConnectionSetsDisconnecting