class_docstr: An in-memory implementation of the Storage interface. This implementation
  is not durable
class_docstr_tok: ["An","in-memory","implementation","of","the","Storage","interface",".","This","implementation","is","not","durable"]
code: def batch_update(
      self,
      table: str,
      mutation: Dict[str, str] = None,
      deletion: List[str] = None,
      expected_version: Optional[int] = None,
  ) -> StoreStatus:
      mutation = mutation if mutation else {}
      deletion = deletion if deletion else []
      with self._lock:
          if (
              expected_version is not None
              and expected_version != self._version
          ):
              return StoreStatus(False, self._version)
          self._version += 1
          key_value_pairs_with_version = {
              key: VersionedValue(value, self._version)
              for key, value in mutation.items()
          }
          self._tables[table].update(key_value_pairs_with_version)
          for deleted_key in deletion:
              self._tables[table].pop(deleted_key, None)
          return StoreStatus(True, self._version)
  
file_path: ray/python/ray/autoscaler/v2/instance_manager/storage.py
imports: import copy
  from abc import ABCMeta, abstractmethod
  from collections import defaultdict, namedtuple
  from threading import Lock
  from typing import Dict, List, Optional, Tuple
label_desc: Use image node_id 2 for calling the InMemoryStorage obj's underlying member method code with example usage: obj.batch_update(table, mutation, deletion, expected_version) and returns: StoreStatus, StoreStatus