class_docstr: Modifies the LinearDataset to also return non-tensor objects.
class_docstr_tok: ["Modifies","the","LinearDataset","to","also","return","non-tensor","objects","."]
code: def __getitem__(self, index):
      return {"x": self.x[index, None], "y": 2}
  
file_path: ray/python/ray/train/tests/test_gpu_2.py
imports: import numpy
  import pytest
  import torch
  import ray
  import ray.data
  import ray.train
  from ray import tune
  from ray.air.config import ScalingConfig
  from ray.train.examples.pytorch.torch_linear_example import LinearDataset
  from ray.train.torch.torch_trainer import TorchTrainer
label_desc: Use image node_id 1 for calling the NonTensorDataset obj's underlying member method code with example usage: obj.__getitem__(index) and returns: dict