<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_icon_file(self, filename, rel="icon"):
 """ Allows to define an icon for the App Args: filename (str):
 the resource file name (ie. "/res:myicon.png") rel (str):
 leave it unchanged (standard "icon") """

        mimetype, encoding = mimetypes.guess_type(filename)
        self.add_child("favicon", '<link rel="%s" href="%s" type="%s" />'%(rel, filename, mimetype))