code: def strip_ids(ids, ids_to_strip):
      """Strip ids_to_strip from the end ids."""
      ids = list(ids)
      while ids and ids[-1] in ids_to_strip:
          ids.pop()
      return ids
  
imports: import re
  import six
label_desc: Use image node_id 1 for calling a global function with example usage: strip_ids(ids, ids_to_strip) and returns: ids