There is an error in #4 in the cheatsheet, it says:
trace = "'x':[1,2],'y':[1,2]}
data = [trace]
data = {}
fig = go.Figure(data=data, layout=layout)
the third line overwrite data. It should be:
trace = "'x':[1,2],'y':[1,2]}
data = [trace]
layout= {}
fig = go.Figure(data=data, layout=layout)