def get_package(name, version, paths=None):
if isinstance(version, basestring):<EOL><INDENT>range_ = VersionRange("<STR_LIT>" % version)<EOL><DEDENT>else:<EOL><INDENT>range_ = VersionRange.from_version(version, "<STR_LIT>")<EOL><DEDENT>it = iter_packages(name, range_, paths)<EOL>try:<EOL><INDENT>return it.next()<EOL><DEDENT>except StopIteration:<EOL><INDENT>return None<EOL><DEDENT>
Get an exact version of a package.

    Args:
        name (str): Name of the package, eg 'maya'.
        version (Version or str): Version of the package, eg '1.0.0'
        paths (list of str, optional): paths to search for package, defaults
            to `config.packages_path`.

    Returns:
        `Package` object, or None if the package was not found.