input: 
  from typing import List, Tuple
  
  def match_counts(data: List[Tuple[str, int]], letters: str) -> int:
      """Given a list of tuples, where each tuple contains a string and an integer, 
      and a string of letters, calculate the number of occurrences of each letter 
      in the strings of the tuples. Return the sum of the integers for each letter 
      multiplied by the number of occurrences of that letter in the provided letters 
      string.
  
      >>> match_counts([('abc', 3), ('bcd', 4)], 'abbc')
      15
      >>> match_counts([('xyz', 2), ('xzy', 5)], 'zxy')
      16
      """
      letter_counts = {letter: 0 for letter in letters}
      for entry in data:
          for char in entry[0]:
              if char in letter_counts:
                  letter_counts[char] += entry[1]
      result = 0
      for letter, count in letter_counts.items():
          result += count * letters.count(letter)
      return result
  
output:     
      letter_counts = {letter: 0 for letter in letters}
      for entry in data:
          for char in entry[0]:
              if char in letter_counts:
                  letter_counts[char] += entry[1]
      result = 0
      for letter, count in letter_counts.items():
          result += count * letters.count(letter)
      return result
  