docstr: Compute global style token 
docstr_tok: ["Compute","global","style","token"]
code: def compute_gst(self, inputs, style_input, speaker_embedding=None):
      """Compute global style token"""
      device = inputs.device
      if isinstance(style_input, dict):
          query = torch.zeros(1, 1, self.gst_embedding_dim // 2).to(
              device
          )
          if speaker_embedding is not None:
              query = torch.cat(
                  [query, speaker_embedding.reshape(1, 1, -1)], dim=-1
              )
  
          _GST = torch.tanh(
              self.gst_layer.style_token_layer.style_tokens
          )
          gst_outputs = torch.zeros(1, 1, self.gst_embedding_dim).to(
              device
          )
          for k_token, v_amplifier in style_input.items():
              key = _GST[int(k_token)].unsqueeze(0).expand(1, -1, -1)
              gst_outputs_att = (
                  self.gst_layer.style_token_layer.attention(query, key)
              )
              gst_outputs = gst_outputs + gst_outputs_att * v_amplifier
      elif style_input is None:
          gst_outputs = torch.zeros(1, 1, self.gst_embedding_dim).to(
              device
          )
      else:
          gst_outputs = self.gst_layer(
              style_input, speaker_embedding
          )  # pylint: disable=not-callable
      inputs = self._concat_speaker_embedding(inputs, gst_outputs)
      return inputs
  
imports: import copy
  from abc import ABC, abstractmethod
  import torch
  from torch import nn
  from TTS.tts.utils.generic_utils import sequence_mask
label_desc: Use image node_id 12 for calling the TacotronAbstract obj's underlying member method code with example usage: obj.compute_gst(inputs, style_input, speaker_embedding) and returns: inputs