code: def write_to_folder(
      self, dataset: Dataset, folder: Path, name: Optional[str] = None
  ) -> None:
      if name is None:
          name = "data"
  
      self.write_to_file(
          dataset, (folder / name).with_suffix(self.suffix)
      )
  
imports: from dataclasses import dataclass, field
  from functools import partial, singledispatch
  from itertools import chain
  from pathlib import Path
  from typing import List, Set, Optional, Union
  from typing_extensions import Literal
  from toolz.curried import keyfilter, valmap
  import numpy
  import pandas
  import pyarrow
  import pyarrow.parquet
  from gluonts.dataset import Dataset, DatasetWriter
  from gluonts.itertools import batcher, rows_to_columns
label_desc: Use image node_id 2 for calling the ArrowWriter obj's underlying member method code with example usage: obj.write_to_folder(dataset, folder, name) without return types