<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_package_from_string(txt, paths=None):
 """Get a package given a string. Args: txt (str):
 String such as 'foo', 'bah-1.3'. paths (list of str, optional):
 paths to search for package, defaults to `config.packages_path`. Returns: `Package` instance, or None if no package was found. """

    o = VersionedObject(txt)
    return get_package(o.name, o.version, paths=paths)