input: Write a function to build a dictionary from a list of samples where each sample is a string in the format "key->value". The function should return the constructed dictionary. 
  
  def build_dictionary(samples):
   dictionary = {}
   for sample in samples:
    key, value = sample.split("->")
    dictionary[key] = value
   return dictionary
   
  samples = ["apple->red", "banana->yellow", "cherry->red"]
  assert build_dictionary(samples) == {"apple": "red", "banana": "yellow", "cherry": "red"}
  samples = ["map->blue", "pen->black"]
  assert build_dictionary(samples) == {"map": "blue", "pen": "black"}
  samples = []
  assert build_dictionary(samples) == {}
output: def build_dictionary(samples):
   dictionary = {}
   for sample in samples:
    key, value = sample.split("->")
    dictionary[key] = value
   return dictionary