code: def _as_bytes(value):
      if isinstance(value, str):
          return value.encode("utf-8")
      return value
  
imports: import json
  import logging
  from concurrent.futures import Future
  from typing import TYPE_CHECKING, Any, Callable, List, Optional, Union
  from ray._private import ray_option_utils
  from ray.util.client.runtime_context import _ClientWorkerPropertyAPI
label_desc: Use image node_id 1 for calling a global function with example usage: _as_bytes(value) and returns: value, value