code: def filter_list(mylist, bad_ixs):
      
      # indices need to be in reverse order for filtering
      # to prevent .pop() from yielding eroneous results
      bad_ixs = sorted(bad_ixs, reverse=True)
      for i in bad_ixs:
          mylist.pop(i)
      return mylist
docs: Removes indices from a list.
  
      All elements in bad_ixs will be removed from the list.
  
      Parameters
      ----------
      mylist : list
          list to filter out specific indices
      bad_ixs : list of ints
          indices to remove from list
  
      Returns
      -------
      mylist : list
          list with elements filtered out