def dict_to_note(dict):
if isinstance(dict, Note):<EOL><INDENT>return dict<EOL><DEDENT>return Note(<EOL>dict['<STR_LIT>'],<EOL>dict.get('<STR_LIT:type>', '<STR_LIT>'),<EOL>dict.get('<STR_LIT>', '<STR_LIT>'),<EOL>dict.get('<STR_LIT>')<EOL>)<EOL>
Transform a dict with keys `note`, `type` and `language` into a
:class:`Note`.

Only the `note` key is mandatory. If `type` is not present, it will
default to `note`. If `language` is not present, it will default to `und`.
If `markup` is not present it will default to `None`.

If the argument passed is already a :class:`Note`, this method just returns
the argument.