docs: def _parse_signed_int_components(buf):
      """Parses the remainder of a file-like object as a signed magnitude value.
  
      Returns:
          Returns a pair of the sign bit and the unsigned magnitude.
      """
      sign_bit = 0
      value = 0
  
      first = True
      while True:
          ch = buf.read(1)
          if ch == b'':
              break
          octet = ord(ch)
          if first:
              if octet & _SIGNED_INT_SIGN_MASK:
                  sign_bit = 1
              value = octet & _SIGNED_INT_SIGN_VALUE_MASK
              first = False
          else:
              value <<= 8
              value |= octet
  
      return sign_bit, value