code: def gen_bytes(percentage: float, memory_limit: int) -> bytes:
      num_bytes = int(math.floor(percentage * memory_limit))
      return b"0" * num_bytes
  
file_path: distributed/distributed/shuffle/tests/test_comm_buffer.py
imports: from __future__ import annotations
  import asyncio
  import math
  from collections import defaultdict
  import pytest
  from dask.utils import parse_bytes
  from distributed.shuffle._comms import CommShardsBuffer
  from distributed.shuffle._limiter import ResourceLimiter
  from distributed.utils_test import gen_test
label_desc: Use image node_id 1 for calling a global function with example usage: gen_bytes(percentage, memory_limit) and returns: unknown