class_docstr: Checks all functions of the DockerEnvironmentDriver
class_docstr_tok: ["Checks","all","functions","of","the","DockerEnvironmentDriver"]
code: def test_list_images(self):
      # TODO: Test out all input permutations
      self.docker_environment_driver.build_image(
          self.image_name, self.dockerfile_path
      )
      # List images without all flag
      result = self.docker_environment_driver.list_images()
      group = [item.__dict__["attrs"]["RepoTags"] for item in result]
      list_of_lists = [sublist for sublist in group if sublist]
      group_flat = [
          item for sublist in list_of_lists for item in sublist
      ]
      assert self.image_name + ":latest" in group_flat
      # List images with all flag
      result = self.docker_environment_driver.list_images(
          all_images=True
      )
      group = [item.__dict__["attrs"]["RepoTags"] for item in result]
      list_of_lists = [sublist for sublist in group if sublist]
      group_flat = [
          item for sublist in list_of_lists for item in sublist
      ]
      assert self.image_name + ":latest" in group_flat
  
imports: from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import os
  import shutil
  import tempfile
  import platform
  import threading
  import sys
  import uuid
  import timeout_decorator
  from io import open
  from datmo.core.controller.environment.driver.dockerenv import DockerEnvironmentDriver
  from datmo.core.util.exceptions import EnvironmentInitFailed, EnvironmentConnectFailed, FileAlreadyExistsError, EnvironmentRequirementsCreateError, EnvironmentImageNotFound, EnvironmentContainerNotFound, PathDoesNotExist, EnvironmentDoesNotExist, EnvironmentExecutionError
  from datmo.core.util.misc_functions import check_docker_inactive, pytest_docker_environment_failed_instantiation
label_desc: Use image node_id 24 for calling the TestDockerEnv obj's underlying member method code with example usage: obj.test_list_images() without return types