code: def filter_records(root, head, update, filters=()):
      
      root, head, update = freeze(root), freeze(head), freeze(update)
      for filter_ in filters:
          root, head, update = filter_(root, head, update)
  
      return thaw(root), thaw(head), thaw(update)
docs: Apply the filters to the records.