code: public Map<String, Integer> allocate(final Map<String, PortMapping> ports,
                                         final Set<Integer> used) {
      return allocate0(ports, Sets.newHashSet(used));
    }
docs: Allocate ports for port mappings with no external ports configured.
  
  @param ports A map of port mappings for a container, both with statically configured
  external ports and dynamic unconfigured external ports.
  @param used  A set of used ports. The ports allocated will not clash with these ports.
  
  @return The allocated ports.