code: def prepare(self, configuration_folder, args_dict, environment):
          
          self.configuration_folder = configuration_folder
          if not os.path.isdir(configuration_folder):
              raise BadOption("Specified configuration folder is not a directory!", wanted=configuration_folder)
          available = [os.path.join(configuration_folder, name) for name in os.listdir(configuration_folder)]
          available_environments = [os.path.basename(path) for path in available if os.path.isdir(path)]
          available_environments = [e for e in available_environments if not e.startswith('.')]
  
          # Make sure the environment exists
          if environment and environment not in available_environments:
              raise BadOption("Specified environment doesn't exist", available=available_environments, wanted=environment)
  
          if environment:
              environment_files = [os.path.join(configuration_folder, "accounts.yaml")]
              for root, dirs, files in os.walk(os.path.join(configuration_folder, environment)):
                  environment_files.extend(os.path.join(root, filename) for filename in files)
  
              with tempfile.NamedTemporaryFile() as fle:
                  contents = json.dumps({"includes": environment_files})
                  fle.write(contents.encode('utf-8'))
                  fle.flush()
                  args_dict['aws_syncr']['environment'] = os.path.split(environment)[-1]
                  super(Collector, self).prepare(fle.name, args_dict)
docs: Make a temporary configuration file from the files in our folder