code: def bytes2human(n, fmt='%(value).1f %(symbol)s', symbols='customary'):
      
      n = int(n)
      if n < 0:
          raise ValueError("n < 0")
      symbols = SYMBOLS[symbols]
      prefix = {}
      for i, s in enumerate(symbols[1:]):
          prefix[s] = 1 << (i+1)*10
      for symbol in reversed(symbols[1:]):
          if n >= prefix[symbol]:
              value = old_div(float(n), prefix[symbol])
              return fmt % locals()
      return fmt % dict(symbol=symbols[0], value=n)
docs: Convert n bytes into a human readable string based on format.
      symbols can be either "customary", "customary_ext", "iec" or "iec_ext",
      see: http://goo.gl/kTQMs