code: public static void removeSampler(Sampler sampler) {
      synchronized (samplerLock) {
        Sampler[] samplers = additionalSamplers;
        int samplerCount = samplers.length;
        for (Sampler s : samplers) {
          if (s.equals(sampler)) {
            samplerCount--;
          }
        }
        Sampler[] newSamplers = new Sampler[samplerCount];
        int i = 0;
        for (Sampler s : samplers) {
          if (!s.equals(sampler)) {
            newSamplers[i++] = s;
          }
        }
        additionalSamplers = newSamplers;
      }
    }
docs: Removes the given {@link Sampler}.
  
  @param sampler The sampler to remove.