code: def test_update(self):
      # check project is not initialized if wrong home
      Config().set_home(os.path.join("does", "not", "exist"))
      failed = False
      try:
          delete()
      except InvalidProjectPath:
          failed = True
      assert failed
  
      # check for snapshot id that does not exist
      Config().set_home(self.temp_dir)
      failed = False
      try:
          update(snapshot_id="does_not_exist")
      except EntityNotFound:
          failed = True
      assert failed
      test_config = {"config_foo": "bar"}
      test_stats = {"stats_foo": "bar"}
      test_message = "new_message"
      test_label = "new_label"
      # update both message and label
      snapshot_entity = self.__setup()
  
      updated_snapshot_obj = update(
          snapshot_id=snapshot_entity.id,
          message=test_message,
          label=test_label,
      )
  
      assert updated_snapshot_obj.id == snapshot_entity.id
      assert updated_snapshot_obj.message == test_message
      assert updated_snapshot_obj.label == test_label
  
      # update message
      snapshot_obj_1 = create(message="test")
  
      updated_snapshot_obj_1 = update(
          snapshot_id=snapshot_obj_1.id, message=test_message
      )
  
      assert updated_snapshot_obj_1.id == snapshot_obj_1.id
      assert updated_snapshot_obj_1.message == test_message
  
      # update label
      snapshot_obj_2 = create(message="test")
  
      updated_snapshot_obj_2 = update(
          snapshot_id=snapshot_obj_2.id, label=test_label
      )
  
      assert updated_snapshot_obj_2.id == snapshot_obj_2.id
      assert updated_snapshot_obj_2.message == test_message
  
      # test config
      snapshot_obj_3 = create(message="test")
  
      updated_snapshot_obj_3 = update(
          snapshot_id=snapshot_obj_3.id, config=test_config
      )
  
      assert updated_snapshot_obj_3.id == snapshot_obj_3.id
      assert updated_snapshot_obj_3.config == test_config
  
      # test stats
      snapshot_obj_4 = create(message="test")
  
      updated_snapshot_obj_4 = update(
          snapshot_id=snapshot_obj_4.id, stats=test_stats
      )
  
      assert updated_snapshot_obj_4.id == snapshot_obj_4.id
      assert updated_snapshot_obj_4.stats == test_stats
  
imports: import os
  import tempfile
  import platform
  from io import open, TextIOWrapper
  from datmo.snapshot import create, ls, update, delete
  from datmo.config import Config
  from datmo.snapshot import Snapshot
  from datmo.core.entity.snapshot import Snapshot
  from datmo.core.controller.project import ProjectController
  from datmo.core.controller.task import TaskController
  from datmo.core.util.exceptions import InvalidProjectPath, SnapshotCreateFromTaskArgs, EntityNotFound, DoesNotExist
  from datmo.core.util.misc_functions import pytest_docker_environment_failed_instantiation
label_desc: Use image node_id 9 for calling the TestSnapshotModule obj's underlying member method code with example usage: obj.test_update() without return types