You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: integration_tests.rs
    path of file: ./repos/vector/src/sinks/aws_cloudwatch_logs
    
    the code of the file until where you have to start completion: use std::convert::TryFrom;

use aws_config::Region;
use aws_sdk_cloudwatchlogs::Client as CloudwatchLogsClient;
use chrono::Duration;
use futures::{stream, StreamE
    
async fn cloudwatch_insert_log_event_batched() {
    trace_init();

    ensure_group().await;

    let stream_name = gen_name();
    let group_name = gen_name();

    let mut batch = BatchConfig::default();
    batch.max_events = Some(2);

    let config = CloudwatchLogsSinkConfig {
        stream_name: Template::try_from(stream_name.as_str()).unwrap(),
        group_name: Template::try_from(group_name.as_str()).unwrap(),
        region: RegionOrEndpoint::with_both("us-east-1", watchlogs_address().as_str()),
        encoding: TextSerializerConfig::default().into(),
        create_missing_group: true,
        create_missing_stream: true,
        retention: Default::default(),
        compression: Default::default(),
        batch,
        request: Default::default(),
        tls: Default::default(),
        assume_role: None,
        auth: Default::default(),
        acknowledgements: Default::default(),
    };

    let (sink, _) = config.build(SinkContext::default()).await.unwrap();

    let timestamp = chrono::Utc::now();

    let (input_lines, events) = random_lines_with_stream(100, 11, None);
    run_and_assert_sink_compliance(sink, events, &AWS_SINK_TAGS).await;

    let response = create_client_test()
        .await
        .get_log_events()
        .log_stream_name(stream_name)
        .log_group_name(group_name)
        .start_time(timestamp.timestamp_millis())
        .send()
        .await
        .unwrap();

    let events = response.events.unwrap();

    let output_lines = events
        .into_iter()
        .map(|e| e.message.unwrap())
        .collect::<Vec<_>>();

    assert_eq!(output_lines, input_lines);
}