code: def badness(text: str) -> int:
      """
      Get the 'badness' of a sequence of text, counting the number of unlikely
      character sequences. A badness greater than 0 indicates that some of it
      seems to be mojibake.
      """
      return len(BADNESS_RE.findall(text))
  
imports: import warnings
  import re
label_desc: Use image node_id 2 for calling a global function with example usage: badness(text) and returns: len