code: def unpack(fmt, arg):
      
  
      if isinstance(arg, bytearray) and not (sys.version_info >= (2, 7, 5)):
          return struct.unpack(fmt, str(arg))
  
      return struct.unpack(fmt, arg)
docs: A shim around struct.unpack to allow it to work on python 2.7.3.