def METHOD_NAME(obj, resolver, **kw):
    value = resolver.parent_context.run(obj, **kw)
    if isinstance(value, pd.DataFrame):
        return torch.utils.data.TensorDataset(
            *[torch.tensor(np.array(value[column].values)) for column in value.columns]
        )
    elif isinstance(value, (pa.Table, pa.RecordBatch)):
        return torch.utils.data.TensorDataset(
            *[torch.tensor(column.to_numpy()) for column in value.columns]
        )
    else:
        raise TypeError(f'torch dataset: unsupported type {type(value)}')