code: def _get_goroot(self, goids_all, namespace):
          
          root_goid = self.consts.NAMESPACE2GO[namespace]
          if root_goid in goids_all:
              return root_goid
          root_goids = set()
          for goid in goids_all:
              goterm = self.gosubdag.go2obj[goid]
              if goterm.depth == 0:
                  root_goids.add(goterm.id)
          if len(root_goids) == 1:
              return next(iter(root_goids))
          raise RuntimeError("UNEXPECTED NUMBER OF ROOTS: {R}".format(R=root_goids))
docs: Get the top GO for the set of goids_all.