code: def test_list(self):
      self.__setup()
      # Create file to add to snapshot
      test_filepath_1 = os.path.join(
          self.snapshot_controller.home, "test.txt"
      )
      with open(test_filepath_1, "wb") as f:
          f.write(to_bytes(str("test")))
  
      # Create snapshot in the project
      snapshot_obj_1 = self.__default_create()
  
      # Create file to add to second snapshot
      test_filepath_2 = os.path.join(
          self.snapshot_controller.home, "test2.txt"
      )
      with open(test_filepath_2, "wb") as f:
          f.write(to_bytes(str("test2")))
  
      # Create second snapshot in the project
      snapshot_obj_2 = self.__default_create()
  
      # List all snapshots and ensure they exist
      result = self.snapshot_controller.list()
  
      assert (
          len(result) == 2
          and snapshot_obj_1 in result
          and snapshot_obj_2 in result
      )
  
      # List all tasks regardless of filters in ascending
      result = self.snapshot_controller.list(
          sort_key="created_at", sort_order="ascending"
      )
  
      assert (
          len(result) == 2
          and snapshot_obj_1 in result
          and snapshot_obj_2 in result
      )
      assert result[0].created_at <= result[-1].created_at
  
      # List all tasks regardless of filters in descending
      result = self.snapshot_controller.list(
          sort_key="created_at", sort_order="descending"
      )
      assert (
          len(result) == 2
          and snapshot_obj_1 in result
          and snapshot_obj_2 in result
      )
      assert result[0].created_at >= result[-1].created_at
  
      # Wrong order being passed in
      failed = False
      try:
          _ = self.snapshot_controller.list(
              sort_key="created_at", sort_order="wrong_order"
          )
      except InvalidArgumentType:
          failed = True
      assert failed
  
      # Wrong key and order being passed in
      failed = False
      try:
          _ = self.snapshot_controller.list(
              sort_key="wrong_key", sort_order="wrong_order"
          )
      except InvalidArgumentType:
          failed = True
      assert failed
  
      # wrong key and right order being passed in
      expected_result = self.snapshot_controller.list(
          sort_key="created_at", sort_order="ascending"
      )
      result = self.snapshot_controller.list(
          sort_key="wrong_key", sort_order="ascending"
      )
      expected_ids = [item.id for item in expected_result]
      ids = [item.id for item in result]
      assert set(expected_ids) == set(ids)
  
      # List snapshots with visible filter
      result = self.snapshot_controller.list(visible=False)
      assert len(result) == 0
  
      result = self.snapshot_controller.list(visible=True)
      assert (
          len(result) == 2
          and snapshot_obj_1 in result
          and snapshot_obj_2 in result
      )
  
imports: import os
  import tempfile
  import platform
  from io import open, TextIOWrapper
  from datmo.config import Config
  from datmo.core.controller.project import ProjectController
  from datmo.core.controller.environment.environment import EnvironmentController
  from datmo.core.controller.task import TaskController
  from datmo.core.controller.snapshot import SnapshotController
  from datmo.core.entity.snapshot import Snapshot
  from datmo.core.util.exceptions import EntityNotFound, RequiredArgumentMissing, TaskNotComplete, InvalidArgumentType, ProjectNotInitialized, InvalidProjectPath, DoesNotExist, UnstagedChanges
  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 TestSnapshotController obj's underlying member method code with example usage: obj.test_list() without return types