def METHOD_NAME(name, obj):
    """Record parameters for a given dataset
    """
    # if this is an injection group, determine which injections to keep
    if isinstance(obj, h5py.Group) and name in ("found", "missed"):
        keep.setdefault(obj.file.filename, {})[name] = theta(obj) < incrad
        total[name] += obj["mass1"].shape[0]
    # if this is just an individual dataset, record its parameters
    if isinstance(obj, h5py.Dataset):
        datasets[name] = {attr: getattr(obj, attr) for attr in (
            "compression",
            "compression_opts",
            "dtype",
        )}