docs: def _get_entities(self, text, language=''):
      """Returns the list of entities retrieved from the given text.
  
      Args:
        text (str): Input text.
        language (:obj:`str`, optional): Language code.
  
      Returns:
        List of entities.
      """
      body = {
          'document': {
              'type': 'PLAIN_TEXT',
              'content': text,
          },
          'encodingType': 'UTF32',
      }
      if language:
        body['document']['language'] = language
  
      request = self.service.documents().analyzeEntities(body=body)
      response = request.execute()
      result = []
      for entity in response.get('entities', []):
        mentions = entity.get('mentions', [])
        if not mentions:
          continue
        entity_text = mentions[0]['text']
        offset = entity_text['beginOffset']
        for word in entity_text['content'].split():
          result.append({'content': word, 'beginOffset': offset})
          offset += len(word)
      return result