docstr: Returns span starts/ends for gold mentions in the document. 
code: def get_training_data(
      self, doc: Doc, words: torch.Tensor
  ) -> Tuple[
      Optional[torch.Tensor],
      Optional[Tuple[torch.Tensor, torch.Tensor]],
  ]:
      """Returns span starts/ends for gold mentions in the document."""
      head2span = sorted(doc["head2span"])
      if not head2span:
          return None, None
      heads, starts, ends = zip(*head2span)
      heads = torch.tensor(heads, device=self.device)
      starts = torch.tensor(starts, device=self.device)
      ends = torch.tensor(ends, device=self.device) - 1
      return self(doc, words, heads), (starts, ends)
  
file_path: stanza/stanza/models/coref/span_predictor.py
imports: from typing import List, Optional, Tuple
  from stanza.models.coref.const import Doc, Span
  import torch
label_desc: Use image node_id 4 for calling the SpanPredictor obj's underlying member method code with example usage: obj.get_training_data(doc, words) and returns: self,  starts,  ends, None,  None