how do I minimize a texture node using python?
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