code: def merge(self, other, merge_body=True):
          
          if not isinstance(other, MujocoXML):
              raise XMLError("{} is not a MujocoXML instance.".format(type(other)))
          if merge_body:
              for body in other.worldbody:
                  self.worldbody.append(body)
          self.merge_asset(other)
          for one_actuator in other.actuator:
              self.actuator.append(one_actuator)
          for one_equality in other.equality:
              self.equality.append(one_equality)
          for one_contact in other.contact:
              self.contact.append(one_contact)
          for one_default in other.default:
              self.default.append(one_default)
docs: Default merge method.
  
          Args:
              other: another MujocoXML instance
                  raises XML error if @other is not a MujocoXML instance.
                  merges <worldbody/>, <actuator/> and <asset/> of @other into @self
              merge_body: True if merging child bodies of @other. Defaults to True.