code: def common_parent_go_ids(goids, godag):
      '''
          This function finds the common ancestors in the GO
          tree of the list of goids in the input.
      '''
      # Find candidates from first
      rec = godag[goids[0]]
      candidates = rec.get_all_parents()
      candidates.update({goids[0]})
  
      # Find intersection with second to nth goid
      for goid in goids[1:]:
          rec = godag[goid]
          parents = rec.get_all_parents()
          parents.update({goid})
  
          # Find the intersection with the candidates, and update.
          candidates.intersection_update(parents)
      return candidatef common_parent_go_ids(goids, godag):
      '''
          This function finds the common ancestors in the GO
          tree of the list of goids in the input.
      '''
      # Find candidates from first
      rec = godag[goids[0]]
      candidates = rec.get_all_parents()
      candidates.update({goids[0]})
  
      # Find intersection with second to nth goid
      for goid in goids[1:]:
          rec = godag[goid]
          parents = rec.get_all_parents()
          parents.update({goid})
  
          # Find the intersection with the candidates, and update.
          candidates.intersection_update(parents)
      return candidates
docs: This function finds the common ancestors in the GO
          tree of the list of goids in the input.