code: def _import_templates(force=False):
      
      tmplpath = os.path.join(resource_filename('cloud_inquisitor', 'data'), 'templates')
      disk_templates = {f: os.path.join(root, f) for root, directory, files in os.walk(tmplpath) for f in files}
      db_templates = {tmpl.template_name: tmpl for tmpl in db.Template.find()}
  
      for name, template_file in disk_templates.items():
          with open(template_file, 'r') as f:
              body = f.read()
          disk_hash = get_hash(body)
  
          if name not in db_templates:
              template = Template()
              template.template_name = name
              template.template = body
  
              db.session.add(template)
              auditlog(
                  event='template.import',
                  actor='init',
                  data={
                      'template_name': name,
                      'template': body
                  }
              )
              logger.info('Imported template {}'.format(name))
          else:
              template = db_templates[name]
              db_hash = get_hash(template.template)
  
              if db_hash != disk_hash:
                  if force or not db_templates[name].is_modified:
                      template.template = body
  
                      db.session.add(template)
                      auditlog(
                          event='template.update',
                          actor='init',
                          data={
                              'template_name': name,
                              'template_diff': diff(template.template, body)
                          }
                      )
                      logger.info('Updated template {}'.format(name))
                  else:
                      logger.warning(
                          'Updated template available for {}. Will not import as it would'
                          ' overwrite user edited content and force is not enabled'.format(name)
                      )
docs: Import templates from disk into database
  
      Reads all templates from disk and adds them to the database. By default, any template that has been modified by
      the user will not be updated. This can however be changed by setting `force` to `True`, which causes all templates
      to be imported regardless of status
  
      Args:
          force (`bool`): Force overwrite any templates with local changes made. Default: `False`
  
      Returns:
          `None`