code: def modutf7_decode(data: bytes) -> str:
      
      parts = []
      is_usascii = True
      buf = memoryview(data)
      while buf:
          byte = buf[0]
          if is_usascii:
              if buf[0:2] == b'&-':
                  parts.append('&')
                  buf = buf[2:]
              elif byte == 0x26:
                  is_usascii = False
                  buf = buf[1:]
              else:
                  parts.append(chr(byte))
                  buf = buf[1:]
          else:
              for i, byte in enumerate(buf):
                  if byte == 0x2d:
                      to_decode = buf[:i].tobytes()
                      decoded = _modified_b64decode(to_decode)
                      parts.append(decoded)
                      buf = buf[i + 1:]
                      is_usascii = True
                      break
      if not is_usascii:
          to_decode = buf.tobytes()
          decoded = _modified_b64decode(to_decode)
          parts.append(decoded)
      return ''.join(parts)
docs: Decode the bytestring using modified UTF-7.
  
      Args:
          data: The encoded bytestring to decode.