A method for detecting gravitational waves coincident with gamma‐ray bursts