def METHOD_NAME(target_dir):
    cd_to_work = True
    try:
        cwd = os.getcwd()
    except OSError:
        cwd = recipe_dir or work_dir
    os.chdir(target_dir)
    # this is very important - or else if versioneer or otherwise is in the start folder,
    # things will pick up the wrong versioneer/whatever!
    sys.path.insert(0, target_dir)
    return cd_to_work, cwd