docstr: Tests invalid type encoder argument.
docstr_tok: ["Tests","invalid","type","encoder","argument","."]
code: def test_not_an_encoder_raises(self, not_an_encoder):
      """Tests invalid type encoder argument."""
      tensorspec = tf.TensorSpec((1,), tf.float32)
      with self.assertRaisesRegex(TypeError, "Encoder"):
          gather_encoder.GatherEncoder.from_encoder(
              not_an_encoder, tensorspec
          )
  
imports: import collections
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow.python.framework import test_util
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.core import core_encoder
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.core import encoding_stage
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.core import gather_encoder
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.testing import test_utils
label_desc: Use image node_id 11 for calling the GatherEncoderTest obj's underlying member method code with example usage: obj.test_not_an_encoder_raises(not_an_encoder) without return types