Hi Chi,
To specify the units using the Value function, the code must be written in the following manner: Value(Year, UnitName)
For example: resdemand = LEAP.Branch("Demand\Household\Urban\Electrified\Refrigeration\Efficient").Variable("Energy Demand Final Units").Value(2019, "Gigajoule")
For other functions, review the object library in the Script Editor (Advanced menu -> Edit scripts).
Thanks,
Emily