code: def calculate_A50(ctgsizes, cutoff=0, percent=50):
      
  
      ctgsizes = np.array(ctgsizes, dtype="int")
      ctgsizes = np.sort(ctgsizes)[::-1]
      ctgsizes = ctgsizes[ctgsizes >= cutoff]
  
      a50 = np.cumsum(ctgsizes)
  
      total = np.sum(ctgsizes)
      idx = bisect(a50, total * percent / 100.)
      l50 = ctgsizes[idx]
      n50 = idx + 1
  
      return a50, l50, n50
docs: Given an array of contig sizes, produce A50, N50, and L50 values