code: def calculate_percentages(
      means: List[np.ndarray], names: List[List[str]]
  ):
      normalized = []
  
      for i in range(len(means)):
          total = np.zeros_like(means[i])
          for j, n in enumerate(names):
              if n[-1][:-1] == names[i][-1][:-1]:
                  total += means[j]
          normalized.append(means[i] / (total + np.finfo(float).eps))
  
      return normalized
  
imports: from typing import List
  import altair
  import numpy
  from labml import analytics
  from labml.analytics import IndicatorCollection
label_desc: Use image node_id 1 for calling a global function with example usage: calculate_percentages(means, names) and returns: normalized