code: def _calculate_ratio(matches, length):
      if length:
          return 2.0 * matches / length
      return 1.0
  
imports: from heapq import nlargest
  from collections import namedtuple
  from types import GenericAlias
  import re
label_desc: Use image node_id 1 for calling a global function with example usage: _calculate_ratio(matches, length) and returns: int, unknown