code: public static InsnList cloneMonitorNode(AbstractInsnNode insnNode) {
          Validate.notNull(insnNode);
          Validate.isTrue(insnNode instanceof InsnNode);
          Validate.isTrue(insnNode.getOpcode() == Opcodes.MONITORENTER || insnNode.getOpcode() == Opcodes.MONITOREXIT);
  
          InsnList ret = new InsnList();
          ret.add(insnNode.clone(new HashMap<>()));
  
          return ret;
      }
docs: Clones a monitorenter/monitorexit node and returns it as an instruction list.
  @param insnNode instruction to clone
  @throws NullPointerException if any argument is {@code null}
  @throws IllegalArgumentException if node isn't of invoke type
  @return instruction list with cloned instruction