code: def get_ns2goids(self, goids):
          
          ns2goids = cx.defaultdict(set)
          go2nt = self.go2nt
          for goid in goids:
              ns2goids[go2nt[goid].NS].add(goid)
          return {ns:gos for ns, gos in ns2goids.items()}
docs: Group GO IDs by namespace.