input: from typing import List
  
  def build_dictionary(samples: List[str]) -> dict:
      """ Build a dictionary from a list of string samples where each sample is a 
      string in the format "key->value". 
      
      >>> build_dictionary(["apple->red", "banana->yellow", "cherry->red"])
      {'apple': 'red', 'banana': 'yellow', 'cherry': 'red'}
      """
      dictionary = {}
      for sample in samples:
          key, value = sample.split("->")
          dictionary[key] = value
      return dictionary
  
  samples = ["apple->red", "banana->yellow", "cherry->red"]
  dictionary = build_dictionary(samples)
  
  print(dictionary)
output:     dictionary = {}
      for sample in samples:
          key, value = sample.split("->")
          dictionary[key] = value
      return dictionary