def SetParent(self, parent):
    if self._parent:
      self._parent.children.remove(self)
    self._parent = parent
    if self._parent:
      self._parent.children.append(self)
Changes the parent of this code object.
dataset/ETHPy150Open google/apis-client-generator/src/googleapis/codegen/template_objects.py/CodeObject.SetParent