code: def test_snapshot_update(self):
      self.__set_variables()
  
      test_config = ["depth: 10", "learning_rate:0.91"]
      test_stats = ["acc: 91.34", "f1_score:0.91"]
      test_config1 = "{'foo_config': 'bar_config'}"
      test_stats1 = "{'foo_stats': 'bar_stats'}"
      test_config2 = "this is a config blob"
      test_stats2 = "this is a stats blob"
      test_message = "test_message"
      test_label = "test_label"
  
      # 1. Updating both message and label
      self.snapshot_command.parse(
          ["snapshot", "create", "-m", "my test snapshot"]
      )
      snapshot_obj = self.snapshot_command.execute()
  
      # Test when optional parameters are not given
      self.snapshot_command.parse(
          [
              "snapshot",
              "update",
              snapshot_obj.id,
              "--message",
              test_message,
              "--label",
              test_label,
          ]
      )
  
      result = self.snapshot_command.execute()
      assert result.id == snapshot_obj.id
      assert result.message == test_message
      assert result.label == test_label
  
      # 2. Updating only message
      self.snapshot_command.parse(
          ["snapshot", "create", "-m", "my test snapshot"]
      )
      snapshot_obj = self.snapshot_command.execute()
  
      # Test when optional parameters are not given
      self.snapshot_command.parse(
          [
              "snapshot",
              "update",
              snapshot_obj.id,
              "--message",
              test_message,
          ]
      )
  
      result = self.snapshot_command.execute()
      assert result.id == snapshot_obj.id
      assert result.message == test_message
  
      # Updating label
      self.snapshot_command.parse(
          ["snapshot", "create", "-m", "my test snapshot"]
      )
      snapshot_obj = self.snapshot_command.execute()
  
      # Test when optional parameters are not given
      self.snapshot_command.parse(
          ["snapshot", "update", snapshot_obj.id, "--label", test_label]
      )
  
      result = self.snapshot_command.execute()
      assert result.id == snapshot_obj.id
      assert result.label == test_label
  
      # 3. Updating config, message and label
      self.snapshot_command.parse(
          ["snapshot", "create", "-m", "my test snapshot"]
      )
      snapshot_obj = self.snapshot_command.execute()
  
      # Test when optional parameters are not given
      self.snapshot_command.parse(
          [
              "snapshot",
              "update",
              snapshot_obj.id,
              "--config",
              test_config[0],
              "--config",
              test_config[1],
              "--message",
              test_message,
              "--label",
              test_label,
          ]
      )
  
      result = self.snapshot_command.execute()
      assert result.id == snapshot_obj.id
      assert result.config == {"depth": "10", "learning_rate": "0.91"}
      assert result.message == test_message
      assert result.label == test_label
  
      # 4. Updating stats, message and label
      # Test when optional parameters are not given
      self.snapshot_command.parse(
          [
              "snapshot",
              "update",
              snapshot_obj.id,
              "--stats",
              test_stats[0],
              "--stats",
              test_stats[1],
              "--message",
              test_message,
              "--label",
              test_label,
          ]
      )
  
      result = self.snapshot_command.execute()
      assert result.id == snapshot_obj.id
      assert result.stats == {"acc": "91.34", "f1_score": "0.91"}
      assert result.message == test_message
      assert result.label == test_label
  
      # Adding sleep due to issue with consistency in blitzdb database
      time.sleep(2)
  
      # 5. Updating config, stats
      # Test when optional parameters are not given
      self.snapshot_command.parse(
          [
              "snapshot",
              "update",
              snapshot_obj.id,
              "--config",
              test_config1,
              "--stats",
              test_stats1,
          ]
      )
  
      result = self.snapshot_command.execute()
      assert result.id == snapshot_obj.id
      assert result.config == {
          "depth": "10",
          "learning_rate": "0.91",
          "foo_config": "bar_config",
      }
      assert result.stats == {
          "acc": "91.34",
          "f1_score": "0.91",
          "foo_stats": "bar_stats",
      }
      assert result.message == test_message
      assert result.label == test_label
  
      # Test when optional parameters are not given
      self.snapshot_command.parse(
          [
              "snapshot",
              "update",
              snapshot_obj.id,
              "--config",
              test_config2,
              "--stats",
              test_stats2,
          ]
      )
  
      result = self.snapshot_command.execute()
      assert result.id == snapshot_obj.id
      assert result.config == {
          "depth": "10",
          "learning_rate": "0.91",
          "foo_config": "bar_config",
          "config": test_config2,
      }
      assert result.stats == {
          "acc": "91.34",
          "f1_score": "0.91",
          "foo_stats": "bar_stats",
          "stats": test_stats2,
      }
      assert result.message == test_message
      assert result.label == test_label
  
imports: from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import os
  import glob
  import time
  import json
  import tempfile
  import platform
  from io import open
  from argparse import ArgumentError
  from datmo.config import Config
  from datmo.cli.driver.helper import Helper
  from datmo.cli.command.project import ProjectCommand
  from datmo.cli.command.snapshot import SnapshotCommand
  from datmo.cli.command.run import RunCommand
  from datmo.core.util.exceptions import ProjectNotInitialized, MutuallyExclusiveArguments, SnapshotCreateFromTaskArgs
  from datmo.core.util.misc_functions import pytest_docker_environment_failed_instantiation
label_desc: Use image node_id 12 for calling the TestSnapshotCommand obj's underlying member method code with example usage: obj.test_snapshot_update() without return types