code: def _bucket_by_turn(self, encoded_data):
      turn_bucket = {}
      for dial in encoded_data:
          turn_len = len(dial)
          if turn_len not in turn_bucket:
              turn_bucket[turn_len] = []
          turn_bucket[turn_len].append(dial)
      del_l = []
      for k in turn_bucket:
          if k >= 5:
              del_l.append(k)
          logging.debug(
              "bucket %d instance %d" % (k, len(turn_bucket[k]))
          )
      return OrderedDict(
          sorted(turn_bucket.items(), key=lambda i: i[0])
      )
  
file_path: TextBox/textbox/evaluator/utils/multiwoz/reader.py
imports: import logging
  import json
  import spacy
  from collections import OrderedDict
  from .None import utils
  from .None import ontology
  from .db_ops import MultiWozDB
label_desc: Use image node_id 2 for calling the _ReaderBase obj's underlying member method code with example usage: obj._bucket_by_turn(encoded_data) and returns: OrderedDict