def attach_docker_logs(container_name: str, log_collection: typing.List, start_time: str = None) -> None:
    """Fetches the Docker logs of a specified container and stores them in a provided list.

    Args:
        container_name (str): Name of the Docker container whose logs are to be
            fetched.
        log_collection (List): A list which its first element is used to store
            the fetched logs or error messages. A list is used to store the
            logs, rather than returning them, so this function can be used in a
            thread.
        start_time (str): A string representing the start time stamp to get docker logs
            must be in the format: "%Y-%m-%dT%H:%M:%S"
    """

    commands =  ["docker", "logs", container_name]

    if start_time != None:
        commands.append(f"--since={start_time}")
    
    completed_process = subprocess.run(
        commands,
        stdout=subprocess.PIPE,
        stderr=subprocess.STDOUT,
        text=True
    )

    if completed_process.returncode == 0:
        log_collection.append(completed_process.stdout)
    else:
        log_collection.append(
            f"{docker_log_failure_message}. "
            f"Failed with error: {completed_process.stderr}")
Fetches the Docker logs of a specified container and stores them in a provided list.

    Args:
        container_name (str): Name of the Docker container whose logs are to be
            fetched.
        log_collection (List): A list which its first element is used to store
            the fetched logs or error messages. A list is used to store the
            logs, rather than returning them, so this function can be used in a
            thread.
        start_time (str): A string representing the start time stamp to get docker logs
            must be in the format: "%Y-%m-%dT%H:%M:%S"
    
tests/api_tests/v1/tests/utilities.py