Z26020

{
    "Z1K1": "Z2",
    "Z2K1": {
        "Z1K1": "Z6",
        "Z6K1": "Z26020"
    },
    "Z2K2": {
        "Z1K1": "Z14",
        "Z14K1": "Z26004",
        "Z14K3": {
            "Z1K1": "Z16",
            "Z16K1": "Z610",
            "Z16K2": "def Z26004(Z26004K1):\n\tdef celsius(temp):\n\t\ttemp['K1'] += temp['K2'] * 273.15\n\t\ttemp['K1'] = round(temp['K1'])\n\t\treturn temp\n\t\n\tdef fahrenheit(temp):\n\t\ttemp['K1'] += temp['K2'] * 459.67\n\t\ttemp['K1'] *= 5.0/9.0\n\t\ttemp['K1'] = round(temp['K1'])\n\t\treturn temp\n\t\n\tdef rankine(temp):\n\t\ttemp['K1'] *= 5.0/9.0\n\t\ttemp['K1'] = round(temp['K1'])\n\t\treturn temp\n\t\n\tdef réaumur(temp):\n\t\ttemp['K1'] += temp['K2'] * 218.52\n\t\ttemp['K1'] *= 5.0/4.0\n\t\ttemp['K1'] = round(temp['K1'])\n\t\treturn temp\n\t\t\n\tdef Rømer(temp):\n\t\ttemp['K1'] += temp['K2'] * 135.90375\n\t\ttemp['K1'] *= 40./21.\n\t\ttemp['K1'] = round(temp['K1'])\n\t\treturn temp\n\t\t\n\tdef Delisle(temp):\n\t\ttemp['K1'] = temp['K2'] * 559.725 - temp['K1']\n\t\ttemp['K1'] *= 2./3.\n\t\ttemp['K1'] = round(temp['K1'])\n\t\treturn temp\n\t\t\n\tdef Newton(temp):\n\t\ttemp['K1'] += temp['K2'] * 273.15*33./99.9839\n\t\ttemp['K1'] *= 99.9839/33.\n\t\ttemp['K1'] = round(temp['K1'])\n\t\treturn temp\n\t\n\tif Z26004K1['K4'] == 'Q11579':\t\t# already in kelvin, return unchanged\n\t\treturn Z26004K1\n\t\t\n\telif Z26004K1['K4'] == 'Q25267':\t\t# degree Celsius\n\t\treturn {\n\t\t\t'K1': celsius(Z26004K1['K1']),\n\t\t\t'K2': celsius(Z26004K1['K2']),\n\t\t\t'K3': celsius(Z26004K1['K3']),\n\t\t\t'K4': 'Q11579'\n\t\t}\n\telif Z26004K1['K4'] == 'Q42289':\t# degree Fahrenheit\n\t\treturn {\n\t\t\t'K1': fahrenheit(Z26004K1['K1']),\n\t\t\t'K2': fahrenheit(Z26004K1['K2']),\n\t\t\t'K3': fahrenheit(Z26004K1['K3']),\n\t\t\t'K4': 'Q11579'\n\t\t}\n\telif Z26004K1['K4'] == 'Q37732658':\t# degree Rankine\n\t\treturn {\n\t\t\t'K1': rankine(Z26004K1['K1']),\n\t\t\t'K2': rankine(Z26004K1['K2']),\n\t\t\t'K3': rankine(Z26004K1['K3']),\n\t\t\t'K4': 'Q11579'\n\t\t}\n\telif Z26004K1['K4'] == 'Q223061' or Z26004K1['K4'] =='Q68725243':\t# degree Réaumur\n\t\treturn {\n\t\t\t'K1': réaumur(Z26004K1['K1']),\n\t\t\t'K2': réaumur(Z26004K1['K2']),\n\t\t\t'K3': réaumur(Z26004K1['K3']),\n\t\t\t'K4': 'Q11579'\n\t\t}\n\telif Z26004K1['K4'] == 'Q68725821' or Z26004K1['K4'] == 'Q488013':\t# degree Rømer \n\t\treturn {\n\t\t\t'K1': Rømer (Z26004K1['K1']),\n\t\t\t'K2': Rømer (Z26004K1['K2']),\n\t\t\t'K3': Rømer (Z26004K1['K3']),\n\t\t\t'K4': 'Q11579'\n\t\t}\n\telif Z26004K1['K4'] == 'Q68726230' or Z26004K1['K4'] == 'Q839449':\t# degree Delisle \n\t\treturn {\n\t\t\t'K1': Delisle (Z26004K1['K1']),\n\t\t\t'K2': Delisle (Z26004K1['K3']), # inverted scale so switch upper with lower\n\t\t\t'K3': Delisle (Z26004K1['K2']), # inverted scale so switch upper with lower\n\t\t\t'K4': 'Q11579'\n\t\t}\n\telif Z26004K1['K4'] == 'Q1133606':\t# degree Newton\n\t\treturn {\n\t\t\t'K1': Newton (Z26004K1['K1']),\n\t\t\t'K2': Newton (Z26004K1['K2']),\n\t\t\t'K3': Newton (Z26004K1['K3']),\n\t\t\t'K4': 'Q11579'\n\t\t}"
        }
    },
    "Z2K3": {
        "Z1K1": "Z12",
        "Z12K1": [
            "Z11",
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1002",
                "Z11K2": "convert Wikidata quantity to kelvin, py"
            }
        ]
    },
    "Z2K4": {
        "Z1K1": "Z32",
        "Z32K1": [
            "Z31"
        ]
    },
    "Z2K5": {
        "Z1K1": "Z12",
        "Z12K1": [
            "Z11"
        ]
    }
}