code: def _bitResponseToValue(bytestring):
      
      _checkString(bytestring, description='bytestring', minlength=1, maxlength=1)
  
      RESPONSE_ON  = '\x01'
      RESPONSE_OFF = '\x00'
  
      if bytestring == RESPONSE_ON:
          return 1
      elif bytestring == RESPONSE_OFF:
          return 0
      else:
          raise ValueError('Could not convert bit response to a value. Input: {0!r}'.format(bytestring))
docs: Convert a response string to a numerical value.
  
      Args:
          bytestring (str): A string of length 1. Can be for example ``\\x01``.
  
      Returns:
          The converted value (int).
  
      Raises:
          TypeError, ValueError