Port get_opcodes() from difflib
Port documentation of get_opcodes from python 3.4's difflib