<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def pipfaster_packagefinder():
 """Provide a short-circuited search when the requirement is pinned and appears on disk. Suggested upstream at: https://github.com/pypa/pip/pull/2114 """

    # A poor man's dependency injection: monkeypatch :(
    try:  # :pragma:nocover: pip>=18.1
        from pip._internal.cli import base_command
    except ImportError:  # :pragma:nocover: pip<18.1
        from pip._internal import basecommand as base_command
    return patched(vars(base_command), {'PackageFinder': FasterPackageFinder})