code: def _validate_number_of_layers(self, number_of_layers):
          
  
          # Only positive numbers are correct
          if number_of_layers <= 0:
              raise SquashError(
                  "Number of layers to squash cannot be less or equal 0, provided: %s" % number_of_layers)
  
          # Do not squash if provided number of layer to squash is bigger
          # than number of actual layers in the image
          if number_of_layers > len(self.old_image_layers):
              raise SquashError(
                  "Cannot squash %s layers, the %s image contains only %s layers" % (number_of_layers, self.image, len(self.old_image_layers)))
docs: Makes sure that the specified number of layers to squash
          is a valid number