def gold_has_passage_answer(gold_label_list, passage_non_null_threshold):
  """Gets vote from annotators for judging if there is a passage answer."""

  gold_has_answer = gold_label_list and (sum([
      label.passage_answer_index >= 0  # passage answer not null
      for label in gold_label_list  # for each annotator
  ]) >= passage_non_null_threshold)

  return gold_has_answer