class ScopedDataSet extends DataSet {
    protected final DataHolder parent;

    public ScopedDataSet(@Nullable DataHolder parent) {
        super();
        this.parent = parent;
    }

    public ScopedDataSet(@Nullable DataHolder parent, @Nullable DataHolder other) {
        super(other);
        this.parent = parent;
    }

    public DataHolder getParent() {
        return parent;
    }

    @Override
    public @NotNull Map<? extends DataKeyBase<?>, Object> getAll() {
        if (parent != null) {
            HashMap<DataKeyBase<?>, Object> all = new HashMap<>(parent.getAll());
            all.putAll(super.getAll());
            return all;
        } else {
            return super.getAll();
        }
    }

    @Override
    public @NotNull Collection<? extends DataKeyBase<?>> getKeys() {<FILL_FUNCTION_BODY>}

    @Override
    public @NotNull MutableDataSet toMutable() {
        MutableDataSet mutableDataSet = new MutableDataSet();
        mutableDataSet.dataSet.putAll(super.getAll());
        return parent != null ? new MutableScopedDataSet(parent, mutableDataSet) : mutableDataSet;
    }

    @Override
    public boolean contains(@NotNull DataKeyBase<?> key) {
        return super.contains(key) || (parent != null && parent.contains(key));
    }

    @Override
    public @Nullable Object getOrCompute(@NotNull DataKeyBase<?> key, @NotNull DataValueFactory<?> factory) {
        if (parent == null || super.contains(key) || !parent.contains(key)) {
            return super.getOrCompute(key, factory);
        } else {
            return parent.getOrCompute(key, factory);
        }
    }
}

        if (parent != null) {
            HashSet<DataKeyBase<?>> all = new HashSet<>(parent.getKeys());
            all.addAll(super.getKeys());
            return all;
        } else {
            return super.getKeys();
        }
    
<methods>public void <init>() ,public void <init>(@Nullable DataHolder) ,public @NotNull DataHolder aggregate() ,public static @NotNull DataHolder aggregate(@Nullable DataHolder, @Nullable DataHolder) ,public static @NotNull DataHolder aggregateActions(@NotNull DataHolder, @NotNull DataHolder) ,public boolean contains(@NotNull DataKeyBase<?>) ,public boolean equals(java.lang.Object) ,public @NotNull Map<? extends DataKeyBase<?>,Object> getAll() ,public @NotNull Collection<? extends DataKeyBase<?>> getKeys() ,public @Nullable Object getOrCompute(@NotNull DataKeyBase<?>, @NotNull DataValueFactory<?>) ,public int hashCode() ,public static transient @NotNull DataSet merge(@NotNull DataHolder []) ,public static void registerDataKeyAggregator(@NotNull DataKeyAggregator) ,public @NotNull DataSet toDataSet() ,public @NotNull DataSet toImmutable() ,public @NotNull MutableDataSet toMutable() ,public java.lang.String toString() <variables>protected final non-sealed HashMap<DataKeyBase<?>,java.lang.Object> dataSet,private static final ArrayList<com.vladsch.flexmark.util.data.DataKeyAggregator> ourDataKeyAggregators