code: def _normWidth(self, w, maxw):
          
          if type(w) == type(""):
              w = ((maxw / 100.0) * float(w[: - 1]))
          elif (w is None) or (w == "*"):
              w = maxw
          return min(w, maxw)
docs: Helper for calculating percentages