docstr: Tests invalid type of tensorspec argument.
docstr_tok: ["Tests","invalid","type","of","tensorspec","argument","."]
code: def test_not_a_tensorspec_raises(self, not_a_tensorspec):
      """Tests invalid type of tensorspec argument."""
      encoder = core_encoder.EncoderComposer(
          test_utils.PlusOneOverNEncodingStage()
      ).make()
      with self.assertRaisesRegex(TypeError, "TensorSpec"):
          gather_encoder.GatherEncoder.from_encoder(
              encoder, not_a_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 12 for calling the GatherEncoderTest obj's underlying member method code with example usage: obj.test_not_a_tensorspec_raises(not_a_tensorspec) without return types