def METHOD_NAME(
    state: State, prev: Context, cur: Context, skip_after: AbstractSet[str]
) -> bool:
    if cur.manual:
        return True
    elif prev.change_id == cur.change_id:
        return False
    elif cur.position == state.inserted_pos:
        if isinstance(extern := state.last_edit.comp.extern, ExternPath):
            return extern.is_dir
        else:
            return False
    elif any(cur.line_before.endswith(token) for token in skip_after):
        return False
    elif cur.syms_before != "":
        return True
    else:
        have_space = (
            bool(stripped := cur.line_before.rstrip())
            and len(cur.line_before) - len(stripped) <= 1
        )
        return have_space