code: def _write_config_file(batch_id, caller_names, base_dir, data):
      
      config_dir = utils.safe_makedir(os.path.join(base_dir, "config"))
      config_file = os.path.join(config_dir, "{0}-ensemble.yaml".format(batch_id))
      algorithm = data["config"]["algorithm"]
      econfig = {"ensemble": algorithm["ensemble"],
                 "names": caller_names,
                 "prep-inputs": False}
      intervals = validate.get_analysis_intervals(data, None, base_dir)
      if intervals:
          econfig["intervals"] = os.path.abspath(intervals)
      with open(config_file, "w") as out_handle:
          yaml.safe_dump(econfig, out_handle, allow_unicode=False, default_flow_style=False)
      return config_file
docs: Write YAML configuration to generate an ensemble set of combined calls.