code: def from_requirement(cls, provider, requirement, parent):
          
          candidates = provider.find_matches(requirement)
          if not candidates:
              raise NoVersionsAvailable(requirement, parent)
          return cls(
              candidates=candidates,
              information=[RequirementInformation(requirement, parent)],
          )
docs: Build an instance from a requirement.