This is an alternative method to make ko against the carpenter's square when Black has no outside liberties. is the only correct defense.
In this way, White can choose the direction of the resulting shape, as shown in the diagram ( is on the better guarded side). On the other hand, 2-2 attack allows Black to choose the direction.