def _extract_node_text(node):
  """Extracts `text` and `content-desc` attribute for a node."""
  text = node.get('text')
  content = node.get('content-desc', [])
  all_text = [text, content] if isinstance(content, str) else [text] + content
  # Remove None or string with only space.
  all_text = [t for t in all_text if t and t.strip()]
  return all_text