def _build_object_name(text, content_desc):
    """Returns the object name based on `text` or `content_desc` attribute.

    Args:
      text: The `text` attribute.
      content_desc: The `content_desc` attribute.

    Returns:
      The object name string.
    """
    return text if text else content_desc