def METHOD_NAME(self, idx_spec, loader_cont_fn, **kwargs):
    # subclass can inherit this if open_file(), __len__(), load_idx() and
    # get_matching_indexes() methods are implemented properly
    """
    Parameters
    ----------
    idx_spec : str
        A string in the form of a pair of brackets enclosing some
        index expression matching data objects in the file
    loader_cont_fn : func (data_obj) -> None
        A loader continuation function that takes a data object
        generated from loading an HDU and does something with it
    kwargs : optional keyword arguments
        Any optional keyword arguments are passed to the code that
        loads the data from the file
    """
    if len(self) == 0:
        raise ValueError("Please call open_file() first!")
    idx_lst = list(self.get_matching_indexes(idx_spec))
    if len(idx_lst) == 0:
        raise ValueError("Spec {} matches no data objects in file".format(idx_spec))
    for idx in idx_lst:
        try:
            dst_obj = self.load_idx(idx, **kwargs)
            loader_cont_fn(dst_obj)
        except Exception as e:
            self.logger.error("Error loading index '{}': {}".format(idx, str(e)))