code: def generate_config(
      image,
      memory_backend,
      s3_end_point,
      s3_bucket_name,
      s3_creds_file,
      config_file,
  ):
      """
      Generate the s3 config file to be used and also the dist-coach-config.template to be used for the test
      It reads the `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` env vars and fails if they are not provided.
      """
      # Write s3 creds
      aws_config = ConfigParser(
          {
              "aws_access_key_id": os.environ.get("AWS_ACCESS_KEY_ID"),
              "aws_secret_access_key": os.environ.get(
                  "AWS_SECRET_ACCESS_KEY"
              ),
          },
          default_section="default",
      )
      with open(s3_creds_file, "w") as f:
          aws_config.write(f)
  
      coach_config = ConfigParser(
          {
              "image": image,
              "memory_backend": memory_backend,
              "data_store": "s3",
              "s3_end_point": s3_end_point,
              "s3_bucket_name": s3_bucket_name,
              "s3_creds_file": s3_creds_file,
          },
          default_section="coach",
      )
      with open(config_file, "w") as f:
          coach_config.write(f)
  
file_path: coach/rl_coach/tests/test_dist_coach.py
imports: from configparser import ConfigParser
  import pytest
  import argparse
  import os
  from rl_coach.coach import CoachLauncher
  import sys
  from minio import Minio
label_desc: Use image node_id 1 for calling a global function with example usage: generate_config(image, memory_backend, s3_end_point, s3_bucket_name, s3_creds_file, config_file) without return types