class_docstr: Text spans scoring class.
  Contains misc scoring algorithms for scoring text fragments extracted
  from a corpus.
  
  Arguments:
      documents(list): List of spaCy documents.
      spans(list[list]): List of spaCy spans representing noun phrases of documents
          document.
class_docstr_tok: ["Text","spans","scoring","class",".","Contains","misc","scoring","algorithms","for","scoring","text","fragments","extracted","from","a","corpus",".","Arguments",":","documents","(","list",")",":","List","of","spaCy","documents",".","spans","(","list","[","list","]",")",":","List","of","spaCy","spans","representing","noun","phrases","of","documents","document","."]
code: def _maybe_group_and_sort(self, is_group, phrases_dict):
      phrase_groups = phrases_dict.items()
      if is_group:
          phrase_groups = self.group_spans(phrases_dict)
      return sorted(phrase_groups, key=lambda x: x[1], reverse=True)
  
imports: import itertools
  import math
  import numpy
  import logging
  from spacy.tokens.doc import Doc
  from spacy.tokens.span import Span
  from spacy.tokens.token import Token
label_desc: Use image node_id 8 for calling the TextSpanScoring obj's underlying member method code with example usage: obj._maybe_group_and_sort(is_group, phrases_dict) and returns: sorted