how do I minimize a texture node using python? I am using the python API to create a node tree for a texture and I'd like to make many of the nodes minimized so they take up less space.  In the UI you accomplish this by clicking the triangle in the upper left corner of the node.

tex = bpy.data.textures['Tex']
n1 = tex.node_tree.nodes.new("TextureNodeDecompose")
n1.minimize() # there is no such function, so what do I do?


While Mr Zak pointed out what I assume is a workable solution, I happen to have a religious objection to using bpy.ops unless there is no other choice (because bpy.ops has cooties; and I bet a dollar that the length of code for a bpy.ops solution will probably be an order of magnitude longer than a non-bpy.ops solution).  Also: any bpy.ops solutions must include the python code required to prepare the UI context.
The mentioned operator changes a single property, which collapses the node to its space-saving variant. The property is called .hide, which is a bit counter-intuitive:

# Get texture
tex = bpy.data.textures['Tex']

# Enable node mode (if not already), otherwise .nodes will not exist
tex.use_nodes = True

# Create node and minimize it
n1 = tex.node_tree.nodes.new("TextureNodeDecompose")
n1.hide = True