class_docstr: Given a string, the CandidateGenerator returns possible target classes as candidates.
code: def _make_backoff_string(self, mention: str) -> str:
      backoff_mention = mention.lower()
      backoff_mention = "".join(
          ch for ch in backoff_mention if category(ch)[0] not in "P"
      )
      backoff_mention = re.sub(" +", " ", backoff_mention)
      return backoff_mention
  
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 2 for calling the CandidateGenerator obj's underlying member method code with example usage: obj._make_backoff_string(mention) and returns: backoff_mention