code: def test_generic_data_classes():
      value_with_exp = ValueWithExpiration(
          value="string_value", expiration_time=DHTExpiration(10)
      )
      assert (
          value_with_exp.value == "string_value"
          and value_with_exp.expiration_time == DHTExpiration(10)
      )
  
      heap_entry = HeapEntry(
          expiration_time=DHTExpiration(10), key="string_value"
      )
      assert (
          heap_entry.key == "string_value"
          and heap_entry.expiration_time == DHTExpiration(10)
      )
  
      sorted_expirations = sorted(
          [DHTExpiration(value) for value in range(1, 1000)]
      )
      sorted_heap_entries = sorted(
          [
              HeapEntry(DHTExpiration(value), key="any")
              for value in range(1, 1000)[::-1]
          ]
      )
      assert all(
          [
              entry.expiration_time == value
              for entry, value in zip(
                  sorted_heap_entries, sorted_expirations
              )
          ]
      )
  
imports: import asyncio
  import concurrent.futures
  import multiprocessing
  import random
  import time
  from concurrent.futures import ThreadPoolExecutor
  import numpy
  import pytest
  import torch
  import hivemind
  from hivemind.compression import deserialize_torch_tensor, serialize_torch_tensor
  from hivemind.proto.runtime_pb2 import CompressionType
  from hivemind.utils import BatchTensorDescriptor, DHTExpiration, HeapEntry, MSGPackSerializer, ValueWithExpiration
  from hivemind.utils.asyncio import achain, aenumerate, aiter_with_timeout, amap_in_executor, anext, as_aiter, asingle, attach_event_on_finished, azip, cancel_and_wait, enter_asynchronously
  from hivemind.utils.mpfuture import InvalidStateError
  from hivemind.utils.performance_ema import PerformanceEMA
label_desc: Use image node_id 10 for calling a global function with example usage: test_generic_data_classes() without return types