class_docstr: Provides a consistent `Transform` interface to tokenizers operating on `DataFrame`s and folders
class_docstr_tok: ["Provides","a","consistent","`","Transform","`","interface","to","tokenizers","operating","on","`","DataFrame","`","s","and","folders"]
code: def get_lengths(self, items):
      if self.lengths is None:
          return None
      if self.mode == "df":
          if (
              isinstance(items, pd.DataFrame)
              and f"{self.tok_text_col}_length" in items.columns
          ):
              return items[f"{self.tok_text_col}_length"].values
      if self.mode == "folder":
          try:
              res = [
                  self.lengths[str(Path(i).relative_to(self.path))]
                  for i in items
              ]
              if len(res) == len(items):
                  return res
          except:
              return None
  
imports: from __future__ import annotations
  from ..torch_basics import *
  from ..data.all import *
  import html
label_desc: Use image node_id 8 for calling the Tokenizer obj's underlying member method code with example usage: obj.get_lengths(items) and returns: None, items, res, None