code: def test_convert_to_bow_vector(self):
      token_saliencies = [
          {
              "token_grad_sentence": dtypes.TokenSalience(
                  ["a", "b", "c"],
                  np.array([0.1, 0.2, 0.3]),
              )
          },
          # Checks that for 2 equal tokens the one with the largest absolute value
          # is preserved.
          {
              "token_grad_sentence": dtypes.TokenSalience(
                  ["d", "e", "d"],
                  np.array([0.4, 0.5, -0.6]),
              )
          },
      ]
  
      clustering_component = salience_clustering.SalienceClustering(
          self.salience_mappers
      )
      vocab_lookup = {"a": 0, "b": 1, "c": 2, "d": 3, "e": 4, "f": 5}
      top_k = 2
      representations = (
          clustering_component._compute_fixed_length_representation(
              token_saliencies, vocab_lookup, top_k
          )
      )
      expected = [
          {
              "token_grad_sentence": np.array(
                  [0.0, 0.2, 0.3, 0.0, 0.0, 0.0]
              )
              / np.sqrt(0.13)
          },
          {
              "token_grad_sentence": np.array(
                  [0.0, 0.0, 0.0, -0.6, 0.5, 0.0]
              )
              / np.sqrt(0.61)
          },
      ]
      np.testing.assert_equal(expected, representations)
  
imports: from absl.testing import absltest
  from absl.testing import parameterized
  from lit_nlp.api import dataset
  from lit_nlp.api import dtypes
  from lit_nlp.components import gradient_maps
  from lit_nlp.components import lime_explainer
  from lit_nlp.components import salience_clustering
  from lit_nlp.lib import testing_utils
  import numpy
label_desc: Use image node_id 4 for calling the SalienceClusteringTest obj's underlying member method code with example usage: obj.test_convert_to_bow_vector() without return types