def extract_container_id_removal(line):
    """
        Extract container id from a Removing line

         Removing intermediate container 816abeca3961
    """
    parts = line.strip().split(' ')
    if len(parts) == 4:
        return parts[3]
    else:
        raise Exception("Unrecognized docker removing line: " + line)