code: def unpack_remotedata(
      o: Any, byte_keys: bool = False
  ) -> tuple[Any, set]:
      """Unpack WrappedKey objects from collection
  
      Returns original collection and set of all found WrappedKey objects
  
      Examples
      --------
      >>> rd = WrappedKey('mykey')
      >>> unpack_remotedata(1)
      (1, set())
      >>> unpack_remotedata(())
      ((), set())
      >>> unpack_remotedata(rd)
      ('mykey', {WrappedKey('mykey')})
      >>> unpack_remotedata([1, rd])
      ([1, 'mykey'], {WrappedKey('mykey')})
      >>> unpack_remotedata({1: rd})
      ({1: 'mykey'}, {WrappedKey('mykey')})
      >>> unpack_remotedata({1: [rd]})
      ({1: ['mykey']}, {WrappedKey('mykey')})
  
      Use the ``byte_keys=True`` keyword to force string keys
  
      >>> rd = WrappedKey(('x', 1))
      >>> unpack_remotedata(rd, byte_keys=True)
      ("('x', 1)", {WrappedKey('('x', 1)')})
      """
      found_futures: set[WrappedKey] = set()
      return (
          _unpack_remotedata_inner(o, byte_keys, found_futures),
          found_futures,
      )
  
imports: from __future__ import annotations
  import asyncio
  import logging
  import random
  from collections import defaultdict
  from collections.abc import Callable, Collection, Coroutine, Mapping
  from functools import partial
  from itertools import cycle
  from typing import Any, TypeVar
  from tlz import concat, drop, groupby, merge
  import dask.config
  from dask.optimization import SubgraphCallable
  from dask.typing import Key
  from dask.utils import is_namedtuple_instance, parse_timedelta
  from distributed.core import ConnectionPool, rpc
  from distributed.utils import All
label_desc: Use image node_id 3 for calling a global function with example usage: unpack_remotedata(o, byte_keys) and returns: _unpack_remotedata_inner,  found_futures