code: def _process_output(res, parse_json=True):
      
      res_payload = res.payload.decode('utf-8')
      output = res_payload.strip()
  
      _LOGGER.debug('Status: %s, Received: %s', res.code, output)
  
      if not output:
          return None
  
      if not res.code.is_successful():
          if 128 <= res.code < 160:
              raise ClientError(output)
          elif 160 <= res.code < 192:
              raise ServerError(output)
  
      if not parse_json:
          return output
  
      return json.loads(output)
docs: Process output.