class_docstr: An abstract base class for collocation finders whose purpose is to
  collect collocation candidate frequencies, filter and rank them.
  
  As a minimum, collocation finders require the frequencies of each
  word in a corpus, and the joint frequency of word tuples. This data
  should be provided through nltk.probability.FreqDist objects or an
  identical interface.
class_docstr_tok: ["An","abstract","base","class","for","collocation","finders","whose","purpose","is","to","collect","collocation","candidate","frequencies",",","filter","and","rank","them",".","As","a","minimum",",","collocation","finders","require","the","frequencies","of","each","word","in","a","corpus",",","and","the","joint","frequency","of","word","tuples",".","This","data","should","be","provided","through","nltk.probability.FreqDist","objects","or","an","identical","interface","."]
docstr: Pad the document with the place holder according to the window_size
docstr_tok: ["Pad","the","document","with","the","place","holder","according","to","the","window_size"]
code: def _build_new_documents(
      cls,
      documents,
      window_size,
      pad_left=False,
      pad_right=False,
      pad_symbol=None,
  ):
      """
      Pad the document with the place holder according to the window_size
      """
      padding = (pad_symbol,) * (window_size - 1)
      if pad_right:
          return _itertools.chain.from_iterable(
              _itertools.chain(doc, padding) for doc in documents
          )
      if pad_left:
          return _itertools.chain.from_iterable(
              _itertools.chain(padding, doc) for doc in documents
          )
  
imports: import itertools
  from nltk.metrics import BigramAssocMeasures, ContingencyMeasures, QuadgramAssocMeasures, TrigramAssocMeasures
  from nltk.metrics.spearman import ranks_from_scores, spearman_correlation
  from nltk.probability import FreqDist
  from nltk.util import ngrams
label_desc: Use image node_id 2 for calling the AbstractCollocationFinder obj's underlying member method code with example usage: obj._build_new_documents(cls, documents, window_size, pad_left, pad_right, pad_symbol) and returns: _itertools, _itertools