class_docstr: `FeatureConnector` for text, encoding to integers with a `TextEncoder`.
code: def encoder(self, new_encoder):
      if self.encoder:
          raise ValueError("Cannot override encoder")
      self._encoder = new_encoder
      encoder_cls = self._encoder_cls or type(None)
      if not isinstance(new_encoder, encoder_cls):
          raise ValueError(
              "Changing type of encoder. Got %s but must be %s"
              % (type(new_encoder).__name__, self._encoder_cls.__name__)
          )
  
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 3 for calling the Text obj's underlying member method code with example usage: obj.encoder(new_encoder) without return types