code: def rectify(arr):
      """Corrects corner cases and converts scores into percentage."""
  
      # Numerator and denominator both 0.
      arr[np.isnan(arr)] = 0
  
      # Numerator > 0, but denominator = 0.
      arr[np.isinf(arr)] = 1
      arr *= 100.0
  
      return arr
  
imports: import os
  import re
  import subprocess
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: rectify(arr) and returns: arr