code: def _enumerator(opener, entry_cls, format_code=None, filter_code=None):
      
  
      archive_res = _archive_read_new()
  
      try:
          r = _set_read_context(archive_res, format_code, filter_code)
          opener(archive_res)
  
          def it():
              while 1:
                  with _archive_read_next_header(archive_res) as entry_res:
                      if entry_res is None:
                          break
  
                      e = entry_cls(archive_res, entry_res)
                      yield e
                      if e.is_consumed is False:
                          _archive_read_data_skip(archive_res)
          yield it()
      finally:
          _archive_read_free(archive_res)
docs: Return an archive enumerator from a user-defined source, using a user-
      defined entry type.