def format_name(first, last, preferred):
  """Sticks together the parts of a prefrosh's name, including preferred."""
  name_parts = []
  name_parts.append(first)
  if preferred is not None:
    name_parts.append("({})".format(preferred))
  name_parts.append(last)
  return " ".join(name_parts)