code: def _parse_desc_length_file(cls, fileobj):
          
  
          value = 0
          for i in xrange(4):
              try:
                  b = cdata.uint8(fileobj.read(1))
              except cdata.error as e:
                  raise ValueError(e)
              value = (value << 7) | (b & 0x7f)
              if not b >> 7:
                  break
          else:
              raise ValueError("invalid descriptor length")
  
          return value
docs: May raise ValueError