docstr: A quick accessor equivalent to `self.candidates[0].parts[0].text`
  
  Raises:
      ValueError: If the candidate list or parts list does not contain exactly one entry.
docstr_tok: ["A","quick","accessor","equivalent","to","`","self.candidates","[","0","]",".parts","[","0","]",".text","`","Raises",":","ValueError",":","If","the","candidate","list","or","parts","list","does","not","contain","exactly","one","entry","."]
code: def text(self):
      """A quick accessor equivalent to `self.candidates[0].parts[0].text`
  
      Raises:
          ValueError: If the candidate list or parts list does not contain exactly one entry.
      """
      parts = self.parts
      if len(parts) != 1 or "text" not in parts[0]:
          raise ValueError(
              "The `response.text` quick accessor only works for "
              "simple (single-`Part`) text responses. This response is not simple text. "
              "Use the `result.parts` accessor or the full "
              "`result.candidates[index].content.parts` lookup "
              "instead."
          )
      return parts[0].text
  
imports: from __future__ import annotations
  import collections
  import contextlib
  import sys
  from collections.abc import Iterable, AsyncIterable
  import dataclasses
  import itertools
  import textwrap
  from typing import TypedDict, Union
  import google.protobuf.json_format
  import google.api_core.exceptions
  from google.ai import generativelanguage
  from google.generativeai import string_utils
label_desc: Use image node_id 4 for calling the BaseGenerateContentResponse obj's underlying member method code with example usage: obj.text() and returns: parts