How change position of Node Group?

I can create a nodegroup using:

group = bpy.data.node_groups.new(type="ShaderNodeTree", name="HeightMaps")

but, how can I change the location in screen? The groups haven’t a location prop.

Here, I have an example that I got from Google:

import bpy


# First Group
group = bpy.data.node_groups.new(type="ShaderNodeTree", name="testgroup")
group.inputs.new("NodeSocketFloat", "Input One")
group.inputs.new("NodeSocketFloat", "Input Two")
input_node = group.nodes.new("NodeGroupInput")
input_node.location = (0, 0)


group.outputs.new("NodeSocketFloat", "Out")
output_node = group.nodes.new("NodeGroupOutput")
output_node.location = (600, 0)


gtr_math_node = group.nodes.new(type='ShaderNodeMath')
gtr_math_node.operation = "GREATER_THAN"
gtr_math_node.name = "greater"
gtr_math_node.location = (200, 100)
group.links.new(input_node.outputs["Input One"], gtr_math_node.inputs[0])


lss_math_node = group.nodes.new(type='ShaderNodeMath')
lss_math_node.operation = "LESS_THAN"
lss_math_node.name = "less"
lss_math_node.location = (200,-100)
group.links.new(input_node.outputs["Input Two"], lss_math_node.inputs[1])


add_math_node = group.nodes.new(type='ShaderNodeMath')
add_math_node.operation = "ADD"
add_math_node.name = "add"
add_math_node.location = (400, 0)


group.links.new(gtr_math_node.outputs["Value"], add_math_node.inputs[0])
group.links.new(lss_math_node.outputs["Value"], add_math_node.inputs[1])


group.links.new(add_math_node.outputs["Value"], output_node.inputs["Out"])


tree = bpy.context.object.active_material.node_tree
group_node = tree.nodes.new("ShaderNodeGroup")
group_node.node_tree = group

The problem is to change the position of the group. I f you create two groups, both are on the same position. I have been looking all the properties, and only view_center looks related, but it is read only.

I don’t have any problem finding the group node and change location :

bpy.data.materials['Material'].node_tree.nodes['Group'].location

I have found the problem. You need assign the group to the material, and THEN run your line and works.

I was using the Group as nodegroup not as a node in the material.

Thanks!