def findTypeParent(element, tag):

    p = element
    while True:
        p = p.getparent()
        if p.tag == tag:
            return p

    # Not found
    return None
Quits the development server asynchronously in an organized fashion.
dataset/ETHPy150Open clips/pattern/pattern/web/docx/docx.py/findTypeParent--crossover with--dataset/ETHPy150Open GoogleCloudPlatform/python-compat-runtime/appengine-compat/exported_appengine_sdk/google/appengine/tools/devappserver2/shutdown.py/async_quit