code: def _get_suggestion(name: str, available: List[str]) -> Optional[str]:
      # First check for simple mistakes like using '-' instead of '_', or vice-versa.
      for ch, repl_ch in (("_", "-"), ("-", "_")):
          suggestion = name.replace(ch, repl_ch)
          if suggestion in available:
              return suggestion
      # If we still haven't found a reasonable suggestion, we return the first suggestion
      # with an edit distance (with transpositions allowed) of 1 to `name`.
      from nltk.metrics.distance import edit_distance
  
      for suggestion in available:
          if edit_distance(name, suggestion, transpositions=True) == 1:
              return suggestion
      return None
  
file_path: allennlp/allennlp/common/registrable.py
imports: import importlib
  import logging
  import inspect
  from collections import defaultdict
  from typing import Callable, ClassVar, DefaultDict, Dict, List, Optional, Tuple, Type, TypeVar, cast, Any
  from allennlp.common.checks import ConfigurationError
  from allennlp.common.from_params import FromParams
label_desc: Use image node_id 1 for calling a global function with example usage: _get_suggestion(name, available) and returns: None, suggestion, suggestion