class_docstr: Bert4Rec data pre-processer to get the masked sequences for each user
  
  Args:
      raw_data (pd.DataFrame): the raw dataframe
      min_rating (int): minimum valid rating
      min_uc (int): minimum user ratings count
      min_sc (int): minimum item count for each valid use
      name (str): dataset for experiment, current support ml-1m, ml-20m, random
      max_len (int): max length of the Bert embedding dimensio
      mask_prob (float): probability of the mask
      dupe_factor (int): number of duplication while generating the random masked seqs
  
  Returns:
      Dict[str, Any]
  
  Example::
  
      raw_data = get_raw_dataframe(
          "random", 5, 40, 200, 4, None
      )
      df = Bert4RecPreprocsser(
          raw_data,
          4,
          5,
          0,
          "random",
          4,
          0.2,
          1,
      ).get_processed_dataframes()
class_docstr_tok: ["Bert4Rec","data","pre-processer","to","get","the","masked","sequences","for","each","user","Args",":","raw_data","(","pd.DataFrame",")",":","the","raw","dataframe","min_rating","(","int",")",":","minimum","valid","rating","min_uc","(","int",")",":","minimum","user","ratings","count","min_sc","(","int",")",":","minimum","item","count","for","each","valid","use","name","(","str",")",":","dataset","for","experiment",",","current","support","ml-1m",",","ml-20m",",","random","max_len","(","int",")",":","max","length","of","the","Bert","embedding","dimensio","mask_prob","(","float",")",":","probability","of","the","mask","dupe_factor","(","int",")",":","number","of","duplication","while","generating","the","random","masked","seqs","Returns",":","Dict","[","str",",","Any","]","Example",":",":","raw_data","=","get_raw_dataframe","(","``","random","''",",","5",",","40",",","200",",","4",",","None",")","df","=","Bert4RecPreprocsser","(","raw_data",",","4",",","5",",","0",",","``","random","''",",","4",",","0.2",",","1",",",")",".get_processed_dataframes","(",")"]
code: def __init__(
      self,
      raw_data: pd.DataFrame,
      min_rating: int,
      min_uc: int,
      min_sc: int,
      name: str,
      max_len: int,
      mask_prob: float,
      dupe_factor: int = 3,
  ) -> None:
      self.raw_data = raw_data
      assert (
          min_uc >= 2
      ), "Need at least 2 ratings per user for validation and test"
      self.min_rating = min_rating
      self.min_uc = min_uc
  
      self.min_sc = min_sc
      self.name = name
  
      self.max_len = max_len
      self.mask_prob = mask_prob
      self.dupe_factor = dupe_factor
      self.user_count = 0
      self.item_count = 0
      self.mask_token = 0
  
imports: import random
  from collections import Counter
  from pathlib import Path
  from typing import Any, Dict, List, Optional, Tuple
  import numpy
  import pandas
label_desc: Use image node_id 1 to create a new Bert4RecPreprocsser object  with example: obj = Bert4RecPreprocsser(raw_data, min_rating, min_uc, min_sc, name, max_len, mask_prob, dupe_factor)