dynamo python code