Can undefinied nodes be converted via scripts?
Very strange. I was the one who asked this question, but my account doesn't say I asked it and I cannot comment on the Ron Jensen comment chain. The solution to my problem was that I was using blender 2.8 and updating to 2.83 LTS changed the node from Undefined and back to Mapping.