code: def __init__(
      self, arrow_file_path: str, schema: "StructType", num_samples: int
  ):
      self.arrow_file_path = arrow_file_path
      self.num_samples = num_samples
      self.field_types = [
          field.dataType.simpleString() for field in schema
      ]
      self.field_converters = [
          _SparkPartitionTorchDataset._get_field_converter(field_type)
          for field_type in self.field_types
      ]
  
file_path: spark/python/pyspark/ml/torch/data.py
imports: from typing import Any, Callable, Iterator
  import torch
  import numpy
  from pyspark.sql.types import StructType
label_desc: Use image node_id 1 to create a new _SparkPartitionTorchDataset object from inherited base classes: torch.utils.data with example: obj = _SparkPartitionTorchDataset(arrow_file_path, schema, num_samples)