'Find a distribution matching requirement `req`
If there is an active distribution for the requested project, this
returns it as long as it meets the version requirement specified by
`req`.  But, if there is an active distribution for the project and it
does *not* meet the `req` requirement, ``VersionConflict`` is raised.
If there is no active distribution for the requested project, ``None``
is returned.'

def find(self, req):

    dist = self.by_key.get(req.key)
    if ((dist is not None) and (dist not in req)):
        raise VersionConflict(dist, req)
    return dist
