Python script to convert Wikidata item claims from one format to another

The Museum of Fine Arts Boston changed the format of their unique object identifiers from slug-number format (eg. "naval-cutter-earl-howe-38422") to just the number itself ("38422"). Since there was no redirection on their side, all the links from Wikidata were broken.

This script goes through and converts the P4625 statments from the old to new style IDs. The rough flow: