def subtractSpecificComps(self, PB, compIDs):
    assert len(compIDs) == PB.K
    for key in self._FieldDims:
      arr = getattr(self, key)
      if arr.ndim > 0:
        arr[compIDs] -= getattr(PB, key)
      else:
        self.setField(key, arr - getattr(PB, key), dims=None)
Tests that a namespace in setTestOnly makes it a valid provide.
dataset/ETHPy150Open daeilkim/refinery/refinery/bnpy/bnpy-dev/bnpy/suffstats/ParamBag.py/ParamBag.subtractSpecificComps--crossover with--dataset/ETHPy150Open google/closure-linter/closure_linter/closurizednamespacesinfo_test.py/ClosurizedNamespacesInfoTest.testSetTestOnlyNamespaces