class_docstr: Entity Linking Model.
  
  The model expects text/sentences with annotated entity mentions and predicts entities to these mentions.
  To this end a word embedding is used to embed the sentences and the embedding of the entity mention goes through a linear layer to get the actual class label.
  The model is able to predict '<unk>' for entity mentions that the model can not confidently match to any of the known labels.
code: def _get_state_dict(self):
      model_state = {
          **super()._get_state_dict(),
          "word_embeddings": self.embeddings.save_embeddings(
              use_state_dict=False
          ),
          "label_type": self.label_type,
          "label_dictionary": self.label_dictionary,
          "pooling_operation": self.pooling_operation,
          "loss_weights": self.weight_dict,
          "candidates": self.candidates,
      }
      return model_state
  
imports: import logging
  import re
  from functools import lru_cache
  from pathlib import Path
  from typing import Any, Callable, Dict, List, Optional, Set, Union
  from unicodedata import category
  import torch
  import flair.embeddings
  import flair.nn
  from flair.data import Dictionary, Sentence, Span
  from flair.file_utils import cached_path
label_desc: Use image node_id 9 for calling the SpanClassifier obj's underlying member method code with example usage: obj._get_state_dict() and returns: model_state