class_docstr: Matchzoo :class:`DataPack` data structure, store dataframe and context.
  
  `DataPack` is a MatchZoo native data structure that most MatchZoo data
  handling processes build upon. A `DataPack` consists of three parts:
  `left`, `right` and `relation`, each one of is a `pandas.DataFrame`.
  
  :param relation: Store the relation between left document
      and right document use ids.
  :param left: Store the content or features for id_left.
  :param right: Store the content or features for
      id_right.
  
  Example:
      >>> left = [
      ...     ['qid1', 'query 1'],
      ...     ['qid2', 'query 2']
      ... ]
      >>> right = [
      ...     ['did1', 'document 1'],
      ...     ['did2', 'document 2']
      ... ]
      >>> relation = [['qid1', 'did1', 1], ['qid2', 'did2', 1]]
      >>> relation_df = pd.DataFrame(relation)
      >>> left = pd.DataFrame(left)
      >>> right = pd.DataFrame(right)
      >>> dp = DataPack(
      ...     relation=relation_df,
      ...     left=left,
      ...     right=right,
      ... )
      >>> len(dp)
      2
class_docstr_tok: ["Matchzoo",":","class",":","`","DataPack","`","data","structure",",","store","dataframe","and","context",".","`","DataPack","`","is","a","MatchZoo","native","data","structure","that","most","MatchZoo","data","handling","processes","build","upon",".","A","`","DataPack","`","consists","of","three","parts",":","`","left","`",",","`","right","`","and","`","relation","`",",","each","one","of","is","a","`","pandas.DataFrame","`",".",":","param","relation",":","Store","the","relation","between","left","document","and","right","document","use","ids",".",":","param","left",":","Store","the","content","or","features","for","id_left",".",":","param","right",":","Store","the","content","or","features","for","id_right",".","Example",":",">",">",">","left","=","[","...","[","'qid1","'",",","'query","1","'","]",",","...","[","'qid2","'",",","'query","2","'","]","...","]",">",">",">","right","=","[","...","[","'did1","'",",","'document","1","'","]",",","...","[","'did2","'",",","'document","2","'","]","...","]",">",">",">","relation","=","[","[","'qid1","'",",","'did1","'",",","1","]",",","[","'qid2","'",",","'did2","'",",","1","]","]",">",">",">","relation_df","=","pd.DataFrame","(","relation",")",">",">",">","left","=","pd.DataFrame","(","left",")",">",">",">","right","=","pd.DataFrame","(","right",")",">",">",">","dp","=","DataPack","(","...","relation=relation_df",",","...","left=left",",","...","right=right",",","...",")",">",">",">","len","(","dp",")","2"]
docstr: Append `length_left` and `length_right` columns.
  
  :param inplace: `True` to modify inplace, `False` to return a modified
      copy. (default: `False`)
  :param verbose: Verbosity.
  
  Example:
      >>> import matchzoo as mz
      >>> data_pack = mz.datasets.toy.load_data()
      >>> 'length_left' in data_pack.frame[0].columns
      False
      >>> new_data_pack = data_pack.append_text_length(verbose=0)
      >>> 'length_left' in new_data_pack.frame[0].columns
      True
      >>> 'length_left' in data_pack.frame[0].columns
      False
      >>> data_pack.append_text_length(inplace=True, verbose=0)
      >>> 'length_left' in data_pack.frame[0].columns
      True
docstr_tok: ["Append","`","length_left","`","and","`","length_right","`","columns",".",":","param","inplace",":","`","True","`","to","modify","inplace",",","`","False","`","to","return","a","modified","copy",".","(","default",":","`","False","`",")",":","param","verbose",":","Verbosity",".","Example",":",">",">",">","import","matchzoo","as","mz",">",">",">","data_pack","=","mz.datasets.toy.load_data","(",")",">",">",">","'length_left","'","in","data_pack.frame","[","0","]",".columns","False",">",">",">","new_data_pack","=","data_pack.append_text_length","(","verbose=0",")",">",">",">","'length_left","'","in","new_data_pack.frame","[","0","]",".columns","True",">",">",">","'length_left","'","in","data_pack.frame","[","0","]",".columns","False",">",">",">","data_pack.append_text_length","(","inplace=True",",","verbose=0",")",">",">",">","'length_left","'","in","data_pack.frame","[","0","]",".columns","True"]
code: def append_text_length(self, verbose=1):
      """
      Append `length_left` and `length_right` columns.
  
      :param inplace: `True` to modify inplace, `False` to return a modified
          copy. (default: `False`)
      :param verbose: Verbosity.
  
      Example:
          >>> import matchzoo as mz
          >>> data_pack = mz.datasets.toy.load_data()
          >>> 'length_left' in data_pack.frame[0].columns
          False
          >>> new_data_pack = data_pack.append_text_length(verbose=0)
          >>> 'length_left' in new_data_pack.frame[0].columns
          True
          >>> 'length_left' in data_pack.frame[0].columns
          False
          >>> data_pack.append_text_length(inplace=True, verbose=0)
          >>> 'length_left' in data_pack.frame[0].columns
          True
  
      """
      self.apply_on_text(
          len,
          rename=("length_left", "length_right"),
          inplace=True,
          verbose=verbose,
      )
  
imports: import typing
  import inspect
  from pathlib import Path
  import functools
  import dill
  from tqdm import tqdm
  import numpy
  import pandas
  import matchzoo
label_desc: Use image node_id 17 for calling the DataPack obj's underlying member method code with example usage: obj.append_text_length(verbose) without return types