code: def generate(self, corpus_length=0):
      if self.index >= len(self.corpus_list):
          self.index = 0
          random.shuffle(self.corpus_list)
      corpus = self.corpus_list[self.index]
      if corpus_length != 0:
          corpus = corpus[0:corpus_length]
      if corpus_length > len(corpus):
          self.logger.warning(
              "generated corpus is shorter than expected."
          )
      self.index += 1
      return self.language, corpus
  
file_path: PaddleOCR/StyleText/engine/corpus_generators.py
imports: import random
  from utils.logging import get_logger
label_desc: Use image node_id 2 for calling the FileCorpus obj's underlying member method code with example usage: obj.generate(corpus_length) and returns: self,  corpus