def METHOD_NAME(input_data, dataset, tmpdir, serialization: Optional[ns] = None):
    input_data = ns.from_dict(input_data)
    def make_path(k, v, parents=None):
        if is_serializable_data(v):
            path = os.path.join(tmpdir, '.'.join(parents+[k, 'data']))
            if vector_keys.match(k):
                v = as_col(v)
            path = serialize_data(v, path, config=serialization)
            return k, path
        return k, v
    ds = ns.walk(input_data, make_path)
    dataset.release()
    gc.collect()
    return ds