code: def update_input(filelist, ivmlist=None, removed_files=None):
      
      newfilelist = []
  
      if removed_files == []:
          return filelist, ivmlist
      else:
          sci_ivm = list(zip(filelist, ivmlist))
          for f in removed_files:
              result=[sci_ivm.remove(t) for t in sci_ivm if t[0] == f ]
          ivmlist = [el[1] for el in sci_ivm]
          newfilelist = [el[0] for el in sci_ivm]
          return newfilelist, ivmlist
docs: Removes files flagged to be removed from the input filelist.
      Removes the corresponding ivm files if present.