def METHOD_NAME(sender, **kwargs):
    """Load from qgis project dom document DatPlotly settings
    and put data into sender(QgisProject instance)"""
    if not isinstance(sender, QgisProject) or not g3wsettings.LOAD_QPLOTLY_FROM_PROJECT:
        return
    # to avoid multithreading load xml file.
    doc = QDomDocument('QgsProject')
    file = QFile(sender.qgs_project.fileName())
    doc.setContent(file)
    settings = QplotlySettings()
    read = settings.read_from_project(doc)
    file.close()
    if not read or settings.source_layer_id is None:
        logger.info('DataPlotly settings not found into project dom document.')
        return
    sender.qplotly = {
        'qgs_layer_id': settings.source_layer_id,
        'type': settings.plot_type,
        'title': settings.layout['title'],
        'selected_features_only': settings.properties['selected_features_only'],
        'visible_features_only': settings.properties['visible_features_only'],
        'xml': settings.write_xml_db().toString()
    }