code: def normalizeLibValue(value):
      
      if value is None:
          raise ValueError("Lib value must not be None.")
      if isinstance(value, (list, tuple)):
          for v in value:
              normalizeLibValue(v)
      elif isinstance(value, dict):
          for k, v in value.items():
              normalizeLibKey(k)
              normalizeLibValue(v)
      elif isinstance(value, basestring):
          value = unicode(value)
      return value
docs: Normalizes lib value.
  
      * **value** must not be ``None``.
      * Returned value is the same type as the input value.