code: def _xread(self, streams, timeout=0, count=None, latest_ids=None):
          
          if latest_ids is None:
              latest_ids = ['$'] * len(streams)
          if len(streams) != len(latest_ids):
              raise ValueError(
                  'The streams and latest_ids parameters must be of the '
                  'same length'
              )
  
          count_args = [b'COUNT', count] if count else []
          if timeout is None:
              block_args = []
          elif not isinstance(timeout, int):
              raise TypeError(
                  "timeout argument must be int, not {!r}".format(timeout))
          else:
              block_args = [b'BLOCK', timeout]
          return block_args + count_args + [b'STREAMS'] + streams + latest_ids
docs: Wraps up common functionality between ``xread()``
          and ``xread_group()``
  
          You should probably be using ``xread()`` or ``xread_group()`` directly.