def METHOD_NAME(self, fileobj, mode):
    fileobj.write(
        "[default]\n"
        "s3 =\n"
        "    addressing_style = %s\n" % mode
    )
    fileobj.flush()
    self.environ['AWS_CONFIG_FILE'] = fileobj.name
    self.driver = create_clidriver()