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: ephemeral.rs
    path of file: ./repos/mirrord/mirrord/kube/src/api/container
    
    the code of the file until where you have to start completion: use futures::StreamExt;
use k8s_openapi::api::core::v1::{EphemeralContainer as KubeEphemeralContainer, Pod};
use kube::{
    api::PostParams,
    runtime::{watcher, WatchStreamExt},
    Client,
};
use mirrord_config::agent::AgentConfig;
use mirrord_progress::Progress;
use serde_json::json;
use tokio::pin;
use tracing::debug;

use crate::{
    api::{
        container::{
            util::{base_command_line, get_agent_image, get_capabilities, wait_for_agent_startup},
            ContainerParams, ContainerVariant,
        },
        kubernetes::{get_k8s_resource_api, AgentKub
    
fn is_ephemeral_container_running(pod: Pod, container_name: &str) -> bool {
    debug!("pod status: {:?}", &pod.status);
    pod.status
        .and_then(|status| {
            status
                .ephemeral_container_statuses
                .and_then(|container_statuses| {
                    container_statuses
                        .iter()
                        .find(|&status| status.name == container_name)
                        .and_then(|status| {
                            status.state.as_ref().map(|state| state.running.is_some())
                        })
                })
        })
        .unwrap_or(false)
}