code: def get_grad(
      self,
      guesses: Sequence[Floats2d],
      truths: Sequence[IntsOrFloatsOrStrs],
  ) -> List[Floats2d]:
      err = "Cannot calculate SequenceCategoricalCrossentropy loss: guesses and truths must be same length"
      if len(guesses) != len(truths):  # pragma: no cover
          raise ValueError(err)
      n = len(guesses)
      d_scores = []
      for yh, y in zip(guesses, truths):
          d_yh = self.cc.get_grad(yh, y)
          if self.normalize:
              d_yh /= n
          d_scores.append(d_yh)
      return d_scores
  
imports: from abc import abstractmethod
  from typing import Any, Dict, Generic, List, Optional, Sequence, Tuple, TypeVar, Union, cast
  from .config import registry
  from .types import Floats2d, Ints1d
  from .util import get_array_module, to_categorical
label_desc: Use image node_id 3 for calling the SequenceCategoricalCrossentropy obj's underlying member method code with example usage: obj.get_grad(guesses, truths) and returns: d_scores