code: def get_coref_infos(
      key_lines,
      sys_lines,
      NP_only=False,
      remove_nested=False,
      keep_singletons=True,
      min_span=False,
      doc="dummy_doc",
  ):
      key_doc_lines = {doc: key_lines}
      sys_doc_lines = {doc: sys_lines}
  
      doc_coref_infos = {}
  
      key_nested_coref_num = 0
      sys_nested_coref_num = 0
      key_removed_nested_clusters = 0
      sys_removed_nested_clusters = 0
      key_singletons_num = 0
      sys_singletons_num = 0
  
      key_clusters, singletons_num = reader.get_doc_mentions(
          doc, key_doc_lines[doc], keep_singletons
      )
      key_singletons_num += singletons_num
  
      if NP_only or min_span:
          key_clusters = reader.set_annotated_parse_trees(
              key_clusters, key_doc_lines[doc], NP_only, min_span
          )
  
      sys_clusters, singletons_num = reader.get_doc_mentions(
          doc, sys_doc_lines[doc], keep_singletons
      )
      sys_singletons_num += singletons_num
  
      if NP_only or min_span:
          sys_clusters = reader.set_annotated_parse_trees(
              sys_clusters, key_doc_lines[doc], NP_only, min_span
          )
  
      if remove_nested:
          (
              nested_mentions,
              removed_clusters,
          ) = reader.remove_nested_coref_mentions(
              key_clusters, keep_singletons
          )
          key_nested_coref_num += nested_mentions
          key_removed_nested_clusters += removed_clusters
  
          (
              nested_mentions,
              removed_clusters,
          ) = reader.remove_nested_coref_mentions(
              sys_clusters, keep_singletons
          )
          sys_nested_coref_num += nested_mentions
          sys_removed_nested_clusters += removed_clusters
  
      sys_mention_key_cluster = reader.get_mention_assignments(
          sys_clusters, key_clusters
      )
      key_mention_sys_cluster = reader.get_mention_assignments(
          key_clusters, sys_clusters
      )
  
      doc_coref_infos[doc] = (
          key_clusters,
          sys_clusters,
          key_mention_sys_cluster,
          sys_mention_key_cluster,
      )
  
      if remove_nested:
          logger.info(
              "Number of removed nested coreferring mentions in the key "
              f"annotation: {key_nested_coref_num}; and system annotation: {sys_nested_coref_num}"
          )
          logger.info(
              "Number of resulting singleton clusters in the key "
              f"annotation: {key_removed_nested_clusters}; and system annotation: {sys_removed_nested_clusters}"
          )
  
      if not keep_singletons:
          logger.info(
              f"{key_singletons_num:d} and {sys_singletons_num:d} singletons are removed from the key and system "
              "files, respectively"
          )
  
      return doc_coref_infos
  
file_path: datasets/metrics/coval/coval.py
imports: import coval
  from coval.conll import reader, util
  from coval.eval import evaluator
  import datasets
label_desc: Use image node_id 1 for calling a global function with example usage: get_coref_infos(key_lines, sys_lines, NP_only, remove_nested, keep_singletons, min_span, doc) and returns: doc_coref_infos