code: def intersect(self, range_):
          
          new_slice = None
  
          if self.package_request.conflict:
              if self.package_request.range is None:
                  new_slice = self.solver._get_variant_slice(
                      self.package_name, range_)
              else:
                  new_range = range_ - self.package_request.range
                  if new_range is not None:
                      new_slice = self.solver._get_variant_slice(
                          self.package_name, new_range)
          else:
              new_slice = self.variant_slice.intersect(range_)
  
          # intersection reduced the scope to nothing
          if new_slice is None:
              if self.pr:
                  self.pr("%s intersected with range '%s' resulted in no packages",
                          self, range_)
              return None
  
          # intersection narrowed the scope
          if new_slice is not self.variant_slice:
              scope = self._copy(new_slice)
              if self.pr:
                  self.pr("%s was intersected to %s by range '%s'",
                          self, scope, range_)
              return scope
  
          # intersection did not change the scope
          return self
docs: Intersect this scope with a package range.
  
          Returns:
              A new copy of this scope, with variants whos version fall outside
              of the given range removed. If there were no removals, self is
              returned. If all variants were removed, None is returned.