def METHOD_NAME(text):  # type (str) -> str
    """
    Find and remove flask app.run() call. This is used for patching
    the app.py file and exec'ing to replace the module without creating
    a new instance.
    """
    flask_instance_name = re.search(_FLASK_INSTANCE_REGEXP, text)
    groups = flask_instance_name.groups()
    if not groups:
        return text
    instance_name = groups[-1]
    new_text = re.sub(instance_name + r"\.run\(.*\)", "pass", text)
    return new_text