code: def accepts(self, package):  # type: (poetry.packages.Package) -> bool
          
          return (
              self._name == package.name
              and self._constraint.allows(package.version)
              and (not package.is_prerelease() or self.allows_prereleases())
          )
docs: Determines if the given package matches this dependency.