docstr: Checks if the given token is punctuation.
  
  Parameters
  ----------
  token
      Token to be checked if it is punctuation.
  punctuation
      String containing all punctuation to be considered.
  
  Returns
  -------
  ``True`` if the `token` is a punctuation. ``False`` otherwise.
docstr_tok: ["Checks","if","the","given","token","is","punctuation",".","Parameters","--","--","--","--","--","token","Token","to","be","checked","if","it","is","punctuation",".","punctuation","String","containing","all","punctuation","to","be","considered",".","Returns","--","--","--","-","``","True","``","if","the","`","token","`","is","a","punctuation",".","``","False","``","otherwise","."]
code: def is_punctuation(self, token: str, punctuation: str) -> bool:
      """
      Checks if the given token is punctuation.
  
      Parameters
      ----------
      token
          Token to be checked if it is punctuation.
      punctuation
          String containing all punctuation to be considered.
  
      Returns
      -------
      ``True`` if the `token` is a punctuation. ``False`` otherwise.
      """
      # need to convert tokens from transformers encoding representation into unicode to allow for proper
      # punctuation check against a list of punctuation unicode characters provided (e.g., for RobertaBase this will
      # convert special  characters such as 'Ġ[âĢ¦]' into ' […]', and will allow us to check if characters such
      # as ' ', '[', '…', ']' appear in the punctuation list.
      string_rep = self.tokenizer.convert_tokens_to_string(
          [token]
      ).strip()
  
      # have to remove `##` prefix for Bert & DistilBert to allow the check with `any`
      if string_rep.startswith(self.SUBWORD_PREFIX):
          string_rep = string_rep.replace(self.SUBWORD_PREFIX, "", 1)
  
      return (
          any([c in punctuation for c in string_rep])
          if len(string_rep)
          else False
      )
  
imports: import abc
  import numpy
  from pathlib import Path
  from typing import Any, Callable, List, Optional, Tuple, Union
  import tensorflow
  import transformers
  from transformers import TFAutoModelForMaskedLM, AutoTokenizer
label_desc: Use image node_id 7 for calling the LanguageModel obj's underlying member method code with example usage: obj.is_punctuation(token, punctuation) and returns: unknown