<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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