def ParseKindsAndSizes(kinds):
 sizes_known = True
 size_total = 0
 kinds_and_sizes = RetrieveCachedStats()
 if kinds_and_sizes:
  for kind in kinds:
   if (kind in kinds_and_sizes):
    size_total += kinds_and_sizes[kind]
   else:
    sizes_known = False
 else:
  sizes_known = False
 if size_total:
  size_total = GetPrettyBytes(size_total)
 return (sizes_known, size_total, (len(kinds) - 2))

def ParseKindsAndSizes ( kinds ) : sizes_known = True size_total = 0 kinds_and_sizes = RetrieveCachedStats ( ) if kinds_and_sizes : for kind in kinds : if ( kind in kinds_and_sizes ) : size_total += kinds_and_sizes [ kind ] else : sizes_known = False else : sizes_known = False if size_total : size_total = GetPrettyBytes ( size_total ) return ( sizes_known , size_total , ( len ( kinds ) - 2 ) )
parses kind|size list and returns template parameters .