code: def classFactory(iface):
      
      # Try to import submodule to check if there are present.
      try:
          from parameters.generic_parameter import GenericParameter
      except ImportError:
          # Don't use safe.utilities.i18n.tr as we need to be outside of `safe`.
          # Some safe functions will import safe_extras.parameters
          QMessageBox.warning(
              None,
              QCoreApplication.translate(
                  '@default', 'InaSAFE submodule not found'),
              QCoreApplication.translate(
                  '@default',
                  'InaSAFE could not find the submodule "parameters". '
                  'You should do "git submodule update" or if you need a new '
                  'clone, do "git clone --recursive git@github.com:inasafe/'
                  'inasafe.git". If this is already a new clone, you should '
                  'do "git submodule init" before "git submodule update".'
                  'Finally, restart QGIS.'))
  
      from .safe.plugin import Plugin
      return Plugin(iface)
docs: Load Plugin class from file Plugin.