code: def do_allocate_channel(
      self, buffer_size_bytes: int, num_readers: int = 1
  ) -> Channel:
      """Generic actor method to allocate an output channel.
  
      Args:
          buffer_size_bytes: The maximum size of messages in the channel.
          num_readers: The number of readers per message.
  
      Returns:
          The allocated channel.
      """
      self._output_channel = Channel(buffer_size_bytes, num_readers)
      return self._output_channel
  
imports: from collections import defaultdict
  from typing import Any, Dict, List, Tuple, Union, Optional
  import logging
  import threading
  import traceback
  import ray
  from ray.exceptions import RayTaskError
  from ray.experimental.channel import Channel
  from ray.util.annotations import DeveloperAPI
label_desc: Use image node_id 1 for calling a global function with example usage: do_allocate_channel(buffer_size_bytes, num_readers) and returns: self