code: def add_gripper(self, arm_name, gripper):
          
          if arm_name in self.grippers:
              raise ValueError("Attempts to add multiple grippers to one body")
  
          arm_subtree = self.worldbody.find(".//body[@name='{}']".format(arm_name))
  
          for actuator in gripper.actuator:
  
              if actuator.get("name") is None:
                  raise XMLError("Actuator has no name")
  
              if not actuator.get("name").startswith("gripper"):
                  raise XMLError(
                      "Actuator name {} does not have prefix 'gripper'".format(
                          actuator.get("name")
                      )
                  )
  
          for body in gripper.worldbody:
              arm_subtree.append(body)
  
          self.merge(gripper, merge_body=False)
          self.grippers[arm_name] = gripper
docs: Mounts gripper to arm.
  
          Throws error if robot already has a gripper or gripper type is incorrect.
  
          Args:
              arm_name (str): name of arm mount
              gripper (MujocoGripper instance): gripper MJCF model