def rebase_replace_insn(path, istream):
    echo_out = False
    for line in fileinput.input(path, inplace=True):
        stripped = line.strip()
        # first blank line indicates end of rebase instructions
        if not stripped:
            if not echo_out:
                while True:
                    replacement = istream.readline().strip()
                    if not replacement:
                        break
                    if not replacement.startswith("#"):
                        print(replacement)
                print("")
                echo_out = True
            continue
        if echo_out:
            print(stripped)
AdvancedOpenCaseAction migration should create a CaseIndex with given properties
dataset/ETHPy150Open openstack/git-upstream/git_upstream/rebase_editor.py/rebase_replace_insn--crossover with--dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/app_manager/tests/test_extension_case.py/AdvancedOpenCaseActionMigrationTests.test_properties