code: def restore_population_parameters(self, global_default=True):
          
          if global_default:
              data = generate_default_profile()
          else:
              data = setting('population_preference', generate_default_profile())
          if not isinstance(data, dict):
              LOGGER.debug(
                  'population parameter is not a dictionary. InaSAFE will use '
                  'the default one.')
              data = generate_default_profile()
          try:
              self.profile_widget.data = data
          except KeyError as e:
              LOGGER.debug(
                  'Population parameter is not in correct format. InaSAFE will '
                  'use the default one.')
              LOGGER.debug(e)
              data = generate_default_profile()
              self.profile_widget.data = data
docs: Setup UI for population parameter page from setting.
  
          :param global_default: If True, set to original default (from
              the value in definitions).
          :type global_default: bool