class_docstr: Dataset for Causal Language modeling.
code: def augment_data(self, encodings):
      parent_encodings = encodings[:-1]
      # randomly skip parent
      parent_encodings = [
          encoding
          for idx, encoding in enumerate(parent_encodings)
          if np.random.random()
          > self.cfg.augmentation.skip_parent_probability
      ]
      # randomly replace parent with another parent
      if (
          np.random.random()
          < self.cfg.augmentation.random_parent_probability
      ):
          idx = np.random.randint(
              len(self.conversation_chain_handler.prompts)
          )
          parent_encodings = [
              self._get_sample_encoding(
                  self.parse_system(
                      self.cfg,
                      self.conversation_chain_handler.systems[idx],
                  ),
                  self.parse_prompt(
                      self.cfg,
                      self.conversation_chain_handler.prompts[idx],
                  ),
                  self.conversation_chain_handler.answers[idx],
              )
          ] + parent_encodings[1:]
      encodings = parent_encodings + [encodings[-1]]
      return encodings
  
imports: import codecs
  import collections.abc
  import logging
  from typing import Any, Dict, List, Tuple, Union
  import numpy
  import pandas
  import torch
  from torch.utils.data import Dataset
  from llm_studio.src.datasets.conversation_chain_handler import ConversationChainHandler
  from llm_studio.src.datasets.text_utils import get_tokenizer
label_desc: Use image node_id 17 for calling the CustomDataset obj's underlying member method code with example usage: obj.augment_data(encodings) and returns: encodings