code: def strip_punc(s, all=False):
      """Removes punctuation from a string.
  
      :param s: The string.
      :param all: Remove all punctuation. If False, only removes punctuation from
          the ends of the string.
      """
      if all:
          return PUNCTUATION_REGEX.sub("", s.strip())
      else:
          return s.strip().strip(string.punctuation)
  
imports: import re
  import string
label_desc: Use image node_id 1 for calling a global function with example usage: strip_punc(s, all) and returns: PUNCTUATION_REGEX, s