Stripping out audio tracks from MKV files

I have some MKV files where the default audio track is non-English, though there is an English audio track in the file. Some research led me to MKVMerge, part of the MKVToolNix collection. A bit more research led me to some Python2 code that’s able to identify the tracks in the file, apply a filter, and instruct mkvmerge to write out a new file with just the chosen language tracks and subtitles.