code: def readinto(self, b) -> int:
      if self._closed:
          raise ValueError("read on closed stream")
      if self._saw_eos:
          return 0
  
      # If readinto only partially fills b without hitting the end
      # of stream, then the upload_obj returns an EntityTooSmall
      # error in some cases.
      total = 0
      while total < len(b):
          if self._off == len(self._unread):
              self._unread = self._q.sync_q.get()
              if self._unread is None:
                  self._saw_eos = True
                  return total
              self._off = 0
              self._unread = memoryview(self._unread)
  
          n = min(len(self._unread) - self._off, len(b) - total)
          b[total : total + n] = self._unread[self._off : self._off + n]
          self._off += n
          total += n
          assert total == len(b) or self._off == len(self._unread)
  
      return total
  
imports: from typing import BinaryIO, List, Optional, Tuple, Type
  from types import TracebackType
  import abc
  import io
  import os
  import sys
  from concurrent.futures import ThreadPoolExecutor
  import janus
  from hailtop.utils import blocking_to_async
  from .exceptions import UnexpectedEOFError
label_desc: Use image node_id 3 for calling the BlockingQueueReadableStream obj's underlying member method code with example usage: obj.readinto(b) and returns: total, int, total