def _deduplicate_and_remove_empty_options(zipped):
  """Remove option-bitmap pairs where option is duplicate or empty.

  Args:
    zipped: list of tuples [(option, bitmap), ...].

  Returns:
    `zipped` without such elements where `option` is duplicate in the list or
    is empty.
  """
  stored_options = set()
  zipped_unique = []
  for (option, bitmap) in zipped:
    # remove empty options and duplicate options at once
    if option and option not in stored_options:
      zipped_unique.append((option, bitmap))
      stored_options.add(option)
  return zipped_unique