class_docstr: `FeatureConnector` for text, encoding to integers with a `TextEncoder`.
docstr: Text are decoded.
docstr_tok: ["Text","are","decoded","."]
code: def repr_html(self, ex: bytes) -> str:
      """Text are decoded."""
      if self.encoder is not None:
          return repr(ex)
  
      try:
          ex = ex.decode("utf-8")
      except UnicodeDecodeError:
          # Some datasets have invalid UTF-8 examples (e.g. opinosis)
          return repr(ex[:1000])
      ex = html.escape(ex)
      ex = textwrap.shorten(ex, width=1000)  # Truncate long text
      return ex
  
imports: import html
  import os
  import textwrap
  from typing import Union
  from absl import logging
  from etils import epath
  import numpy
  from tensorflow_datasets.core.deprecated import text
  from tensorflow_datasets.core.features import feature
  from tensorflow_datasets.core.features import tensor_feature
  from tensorflow_datasets.core.proto import feature_pb2
  from tensorflow_datasets.core.utils import type_utils
label_desc: Use image node_id 15 for calling the Text obj's underlying member method code with example usage: obj.repr_html(ex) and returns: ex, repr, repr