code: def reduce_by(self, package_request):
          
          self.solver.reduction_broad_tests_count += 1
  
          if self.package_request.conflict:
              # conflict scopes don't reduce. Instead, other scopes will be
              # reduced against a conflict scope.
              return (self, [])
  
          # perform the reduction
          new_slice, reductions = self.variant_slice.reduce_by(package_request)
  
          # there was total reduction
          if new_slice is None:
              self.solver.reductions_count += 1
  
              if self.pr:
                  reqstr = _short_req_str(package_request)
                  self.pr("%s was reduced to nothing by %s", self, reqstr)
                  self.pr.br()
  
              return (None, reductions)
  
          # there was some reduction
          if new_slice is not self.variant_slice:
              self.solver.reductions_count += 1
              scope = self._copy(new_slice)
  
              if self.pr:
                  reqstr = _short_req_str(package_request)
                  self.pr("%s was reduced to %s by %s", self, scope, reqstr)
                  self.pr.br()
              return (scope, reductions)
  
          # there was no reduction
          return (self, [])
docs: Reduce this scope wrt a package request.
  
          Returns:
              A (_PackageScope, [Reduction]) tuple, where the scope is a new
              scope copy with reductions applied, or self if there were no
              reductions, or None if the scope was completely reduced.