def AmbiguousShortrefHotlistNames(short_refs, user_hotlist_pbs):
  """Find and return ambiguous hotlist shortrefs' hotlist names.

  A hotlist shortref is ambiguous iff there exists more than
  hotlist with that name in the user's hotlists.

  Args:
    short_refs: a list of ParsedHotlistRef object specifying only
      a hotlist name (user_email being none)
    user_hotlist_pbs: the hotlist protobuf objects of all hotlists
      belonging to the user

  Returns:
    a list of ambiguous hotlist names; if none are found, the empty list
  """
  ambiguous_names = set()
  seen = set()
  for hotlist in user_hotlist_pbs:
    if hotlist.name in seen:
      ambiguous_names.add(hotlist.name)
    seen.add(hotlist.name)
  ambiguous_from_refs = list()
  for ref in short_refs:
    if ref.hotlist_name in ambiguous_names:
      ambiguous_from_refs.append(ref.hotlist_name)
  return ambiguous_from_refs