code: def to_ipa(s):
      
      identity = identify(s)
      if identity == IPA:
          return s
      elif identity == PINYIN:
          return pinyin_to_ipa(s)
      elif identity == ZHUYIN:
          return zhuyin_to_ipa(s)
      else:
          raise ValueError("String is not a valid Chinese transcription.")
docs: Convert *s* to IPA.