code: def unit_overlap(evaluated_model, reference_model):
      """
      Computes unit overlap of two text documents. Documents
      has to be represented as TF models of non-empty document.
  
      :returns float:
          0 <= overlap <= 1, where 0 means no match and 1 means
          exactly the same.
      """
      if not (
          isinstance(evaluated_model, TfModel)
          and isinstance(reference_model, TfModel)
      ):
          raise ValueError(
              "Arguments has to be instances of 'sumy.models.TfDocumentModel'"
          )
  
      terms1 = frozenset(evaluated_model.terms)
      terms2 = frozenset(reference_model.terms)
  
      if not terms1 and not terms2:
          raise ValueError(
              "Documents can't be empty. Please pass the valid documents."
          )
  
      common_terms_count = len(terms1 & terms2)
      return common_terms_count / (
          len(terms1) + len(terms2) - common_terms_count
      )
  
imports: from __future__ import absolute_import
  from __future__ import division, print_function, unicode_literals
  from ..models import TfDocumentModel
label_desc: Use image node_id 2 for calling a global function with example usage: unit_overlap(evaluated_model, reference_model) and returns: unknown