code: def __init__(
      self,
      path: PurePath,
      tokenizer: Callable,
      *,
      url: Optional[str] = None,
      filter_subset: Optional[int] = None,
  ):
      path = Path(path)
      if not path.exists():
          if not url:
              raise FileNotFoundError(str(path))
          else:
              download_file(url, path)
  
      with monit.section("Load data"):
          text = self.load(path)
          if filter_subset:
              text = text[:filter_subset]
          split = int(len(text) * 0.9)
          train = text[:split]
          valid = text[split:]
  
      super().__init__(path, tokenizer, train, valid, "")
  
imports: import random
  from pathlib import PurePath, Path
  from typing import List, Callable, Dict, Optional
  import torch
  from torch.utils.data import IterableDataset, Dataset
  from labml import monit
  from labml.utils.download import download_file
label_desc: Use image node_id 1 to create a new TextFileDataset object from inherited base classes: TextDataset with example: obj = TextFileDataset(path, tokenizer)