code: def allocate_memory(
      total_allocate_bytes: int,
      num_chunks: int = 10,
      allocate_interval_s: float = 0,
  ) -> int:
      chunks = []
      # divide by 8 as each element in the array occupies 8 bytes
      bytes_per_chunk = total_allocate_bytes / 8 / num_chunks
      for _ in range(num_chunks):
          chunks.append([0] * ceil(bytes_per_chunk))
          time.sleep(allocate_interval_s)
      return 1
  
imports: from math import ceil
  import ray
  import time
  import psutil
label_desc: Use image node_id 1 for calling a global function with example usage: allocate_memory(total_allocate_bytes, num_chunks, allocate_interval_s) and returns: int