code: def _internal_kv_put(
      key: Union[str, bytes],
      value: Union[str, bytes],
      overwrite: bool = True,
      *,
      namespace: Optional[Union[str, bytes]] = None,
  ) -> bool:
      """Globally associates a value with a given binary key.
  
      This only has an effect if the key does not already have a value.
  
      Returns:
          already_exists: whether the value already exists.
      """
  
      if isinstance(key, str):
          key = key.encode()
      if isinstance(value, str):
          value = value.encode()
      if isinstance(namespace, str):
          namespace = namespace.encode()
      assert (
          isinstance(key, bytes)
          and isinstance(value, bytes)
          and isinstance(overwrite, bool)
      )
      return (
          global_gcs_client.internal_kv_put(
              key, value, overwrite, namespace
          )
          == 0
      )
  
file_path: ray/python/ray/experimental/internal_kv.py
imports: from typing import List, Optional, Union
  from ray._private.client_mode_hook import client_mode_hook
  from ray._raylet import GcsClient
label_desc: Use image node_id 8 for calling a global function with example usage: _internal_kv_put(key, value, overwrite) and returns: unknown