docs: def generate_init(self, dst, out_format, vms_to_include, filters=None):
          """
          Generate an init file which represents this env and can
          be used with the images created by self.export_vms
          Args:
              dst (str): path and name of the new init file
              out_format (plugins.output.OutFormatPlugin):
                  formatter for the output (the default is yaml)
              filters (list): list of paths to keys that should be removed from
                  the init file
              vms_to_include (list of :class:lago.plugins.vm.VMPlugin):
                  list of vms to include in the init file
          Returns:
              None
          """
          # todo: move this logic to PrefixExportManager
          with LogTask('Exporting init file to: {}'.format(dst)):
              # Set the default formatter to yaml. The default formatter
              # doesn't generate a valid init file, so it's not reasonable
              # to use it
              if isinstance(out_format, plugins.output.DefaultOutFormatPlugin):
                  out_format = plugins.output.YAMLOutFormatPlugin()
  
              if not filters:
                  filters = [
                      'domains/*/disks/*/metadata',
                      'domains/*/metadata/deploy-scripts', 'domains/*/snapshots',
                      'domains/*/name', 'nets/*/mapping', 'nets/*/dns_records'
                  ]
  
              spec = self.get_env_spec(filters)
              temp = {}
  
              for vm in vms_to_include:
                  temp[vm.name()] = spec['domains'][vm.name()]
  
              spec['domains'] = temp
  
              for _, domain in spec['domains'].viewitems():
                  domain['disks'] = [
                      d for d in domain['disks'] if not d.get('skip-export')
                  ]
  
                  for disk in domain['disks']:
                      if disk['type'] == 'template':
                          disk['template_type'] = 'qcow2'
                      elif disk['type'] == 'empty':
                          disk['type'] = 'file'
                          disk['make_a_copy'] = 'True'
  
                      # Insert the relative path to the exported images
                      disk['path'] = os.path.join(
                          '$LAGO_INITFILE_PATH', os.path.basename(disk['path'])
                      )
  
              with open(dst, 'wt') as f:
                  if isinstance(out_format, plugins.output.YAMLOutFormatPlugin):
                      # Dump the yaml file without type tags
                      # TODO: Allow passing parameters to output plugins
                      f.write(yaml.safe_dump(spec))
                  else:
                      f.write(out_format.format(spec))