class_docstr: Parser class for connections using Hiredis
class_docstr_tok: ["Parser","class","for","connections","using","Hiredis"]
code: def read_response(self, disable_decoding=False):
      if not self._reader:
          raise ConnectionError(SERVER_CLOSED_CONNECTION_ERROR)
  
      # _next_response might be cached from a can_read() call
      if self._next_response is not False:
          response = self._next_response
          self._next_response = False
          return response
  
      if disable_decoding:
          response = self._reader.gets(False)
      else:
          response = self._reader.gets()
  
      while response is False:
          self.read_from_socket()
          if disable_decoding:
              response = self._reader.gets(False)
          else:
              response = self._reader.gets()
      # if the response is a ConnectionError or the response is a list and
      # the first item is a ConnectionError, raise it as something bad
      # happened
      if isinstance(response, ConnectionError):
          raise response
      elif (
          isinstance(response, list)
          and response
          and isinstance(response[0], ConnectionError)
      ):
          raise response[0]
      return response
  
imports: import asyncio
  import socket
  import sys
  from typing import Callable, List, Optional, TypedDict, Union
  from ..exceptions import ConnectionError, InvalidResponse, RedisError
  from ..typing import EncodableT
  from ..utils import HIREDIS_AVAILABLE
  from .base import AsyncBaseParser, BaseParser
  from .socket import NONBLOCKING_EXCEPTION_ERROR_NUMBERS, NONBLOCKING_EXCEPTIONS, SENTINEL, SERVER_CLOSED_CONNECTION_ERROR
label_desc: Use image node_id 7 for calling the _HiredisParser obj's underlying member method code with example usage: obj.read_response(disable_decoding) and returns: response, response