code: def put(self, key: str, val: Any) -> bool:
      if not isinstance(key, str):
          raise TypeError(
              "key must be a string, got: {}.".format(type(key))
          )
      self.store[key] = val
      return True
  
file_path: ray/python/ray/serve/tests/unit/test_endpoint_state.py
imports: import sys
  from typing import Any, Tuple
  from unittest.mock import Mock, patch
  import pytest
  from ray.serve._private.endpoint_state import EndpointState
label_desc: Use image node_id 2 for calling the MockKVStore obj's underlying member method code with example usage: obj.put(key, val) and returns: True