class_docstr: Augmenter that changes the case characters, words, or entire texts depending on the
  given 'granularity'.
  
  The 'cadence' option are used to adjust the frequency of the case changes, to avoid
  detection by automated deobfuscation techniques. If 'cadence' is not an integer
  (e.g. 2.5), the case will be changed on *average* about every 2.5 chars.
class_docstr_tok: ["Augmenter","that","changes","the","case","characters",",","words",",","or","entire","texts","depending","on","the","given","'granularity","'",".","The","'cadence","'","option","are","used","to","adjust","the","frequency","of","the","case","changes",",","to","avoid","detection","by","automated","deobfuscation","techniques",".","If","'cadence","'","is","not","an","integer","(","e.g",".","2.5",")",",","the","case","will","be","changed","on","*","average","*","about","every","2.5","chars","."]
code: def __init__(
      self,
      case: str,
      granularity: str,
      cadence: float = 1.0,
      seed: Optional[int] = 10,
  ):
      assert granularity in {
          "char",
          "word",
          "all",
      }, "Must set 'granularity' to either 'word' or 'all'."
      assert (
          cadence >= 1.0
      ), "Must set 'cadence' to be no less than 1.0."
      assert case in {
          "lower",
          "upper",
          "title",
          "random",
      }, "'case' must be one of: lower, upper, title, random"
  
      self.case_changer = CaseChanger(case, seed)
      self.granularity = granularity
      self.cadence = cadence
  
file_path: AugLy/augly/text/augmenters/case.py
imports: import math
  from typing import List, Optional, Union
  import numpy
  from augly.text.augmenters.utils import rejoin_words_and_whitespace, split_words_on_whitespace
label_desc: Use image node_id 1 to create a new CaseAugmenter object  with example: obj = CaseAugmenter(case, granularity, cadence, seed)