class_docstr: ## Arithmetic Dataset
  
  This creates arithmetic addition problems and solutions with workings.
  We've only implemented addition so far.
  
  It's based on a character level tokenization.
class_docstr_tok: ["#","#","Arithmetic","Dataset","This","creates","arithmetic","addition","problems","and","solutions","with","workings",".","We","'ve","only","implemented","addition","so","far",".","It","'s","based","on","a","character","level","tokenization","."]
docstr: :param seq_len: is the sequence length of generated math problems.
      We fill as many problems as possible upto this length
  :max_digits: is the maximum number of digits in the operand integers
  :n_sequences: is the number of sequences per epoch
docstr_tok: [":","param","seq_len",":","is","the","sequence","length","of","generated","math","problems",".","We","fill","as","many","problems","as","possible","upto","this","length",":","max_digits",":","is","the","maximum","number","of","digits","in","the","operand","integers",":","n_sequences",":","is","the","number","of","sequences","per","epoch"]
code: def __init__(self, seq_len: int, max_digits: int, n_sequences: int):
      """
      :param seq_len: is the sequence length of generated math problems.
          We fill as many problems as possible upto this length
      :max_digits: is the maximum number of digits in the operand integers
      :n_sequences: is the number of sequences per epoch
      """
      self.n_sequences = n_sequences
      self.max_digits = max_digits
      self.seq_len = seq_len
      # Token id to string
      self.itos = list(string.digits + "xe =\n?+;")
      # Character to token id
      self.stoi = {c: i for i, c in enumerate(self.itos)}
  
imports: import random
  import string
  from typing import List
  import torch
  from labml.logger import Text
  from torch.utils.data import DataLoader, Dataset
  from labml import monit, logger, tracker
  from labml.configs import option
  from labml_nn.experiments.nlp_autoregression import NLPAutoRegressionConfigs, transpose_batch
label_desc: Use image node_id 1 to create a new ArithmeticDataset object from inherited base classes: Dataset with example: obj = ArithmeticDataset(seq_len, max_digits, n_sequences)