Language Dictionary =================== Consider a *Language dictionary* meaning a :class:`dict` with the translation from words of one language to words of another language. Let's call it a as has the following format: - *keys*: one-word :class:`str` - *values*: :class:`list` of the words (:class:`str`) that are a proper translation of the associated key. For example, see few words of a english-catalan dictionary: .. literalinclude:: invert_lang_dict.test :language: pycon :start-after: --ini-in :end-before: --fi-in You are required to implement the following functions and deliver them in the same module :mod:`language_dictionary` (file :file:`language_dictionary.py`). Their relative weight is 2/3 and 1/3 respectively. ------------------------T------------------------------------------------------------------------ The first function is: .. py:function:: invert_lang_dict(langD) such that **given** *langD* (:class:`dict`) a *language dictionary* as described above **returns** a new :class:`dict` a *language dictionary* where: #. The keys are all the words (:class:`str`) in the *langD* values. #. The value associated to each key is a :class:`list` with all the words that are a proper translation of the key according to *langD*. The words must be **alphabetically ordered**. The input :class:`dict` should **not** be modified. For example, the output of the above english-catalan dictionary would be: .. literalinclude:: invert_lang_dict.test :language: pycon :start-after: --ini-out :end-before: --fi-out Doctests are available in the :download:`invert_lang_dict.test` file. ------------------------------------------------------------------------------------------------ The second function is: .. py:function:: invert_lang_dict_plus(langD) such that **given** *langD* (:class:`dict`) a *language dictionary* as described above **returns** a new :class:`dict` a *language dictionary* where: #. The keys are single letters (:class:`str`) that are the first letter of a word in the *langD* values. #. The value associated to each key is a :class:`dict` where the keys are the works in the values of *langD* stating with that letter and the values is a :class:`list` of the words that are a proper translation of the word according to *langD*. The words must be **alphabetically ordered**. The input :class:`dict` should **not** be modified. For example, the output of the above english-catalan dictionary would be: .. literalinclude:: invert_lang_dict_plus.test :language: pycon :start-after: --ini-out :end-before: --fi-out Doctests are available in the :download:`invert_lang_dict_plus.test` file.