code: def whole_df_to_segmented_df(
      self, df: pd.DataFrame, parsed_col: str, verbose: bool = False
  ) -> pd.DataFrame:
      assert parsed_col in df.columns
      segment_data = []
      docit = enumerate(df[parsed_col])
      if verbose:
          docit = tqdm(docit, total=len(df))
      for doc_i, doc in docit:
          segment = []
          segment_len = 0
          segment_idx = 0
          for _, sent in enumerate(doc.sents):
              if segment_len == 0:
                  segment = [sent]
                  segment_len += len(sent)
              elif segment_len + len(sent) > self.segment_length:
                  segment_data.append(
                      {
                          "Text": str(
                              doc[
                                  segment[0][0].i : segment[-1][-1].i
                                  + 1
                              ]
                          ),
                          "DocIdx": doc_i,
                          "SegmentIdx": segment_idx,
                      }
                  )
                  segment_idx += 1
                  segment = []
                  segment_len = 0
              else:
                  segment.append(sent)
                  segment_len += len(sent)
          if segment_len > 0:
              segment_data.append(
                  {
                      "Text": str(
                          doc[segment[0][0].i : segment[-1][-1].i + 1]
                      ),
                      "DocIdx": doc_i,
                      "SegmentIdx": segment_idx,
                  }
              )
      return pd.DataFrame(segment_data)
  
imports: import pandas
  from tqdm.auto import tqdm
label_desc: Use image node_id 2 for calling the SentenceSequenceSegmenter obj's underlying member method code with example usage: obj.whole_df_to_segmented_df(df, parsed_col, verbose) and returns: pd