def METHOD_NAME(self, entry: dict):
    result = {}
    for column in self.columns:
        value = entry[column]
        # We need to handle arrays with more than 1 dimension specially.
        # If we don't, pyarrow complains. As an optimisation, we flatten
        # the array to 1d and store its shape to gain zero-copy reads
        # during decoding.
        if column in self.ndarray_columns:
            if self.flatten_arrays:
                result[f"{column}._np_shape"] = list(value.shape)
                value = value.flatten()
            else:
                value = list(value)
        result[column] = value
    return result