code: def extract(self):
          
          if not self.package_request.conflict:
              new_slice, package_request = self.variant_slice.extract()
              if package_request:
                  assert(new_slice is not self.variant_slice)
                  scope = copy.copy(self)
                  scope.variant_slice = new_slice
                  if self.pr:
                      self.pr("extracted %s from %s", package_request, self)
                  return (scope, package_request)
  
          return (self, None)
docs: Extract a common dependency.
  
          Returns:
              A (_PackageScope, Requirement) tuple, containing the new scope copy
              with the extraction, and the extracted package range. If no package
              was extracted, then (self,None) is returned.