def cmd_sprout(args):

    off_branch = args.get(0)
    new_branch = args.get(1)

    if (off_branch is None) and (new_branch is None):
        # new_branch is required, so should be passed at least 1 arg
        show_error('Please pass new branch name to create.')
        help('sprout', to_stderr=True)
        sys.exit(1)
    elif new_branch is None:
        # off_branch is optional, so use specified one as new_branch
        new_branch = args.get(0)
        off_branch = get_current_branch_name()
    else:
        off_branch = fuzzy_match_branch(off_branch)

    branch_names = get_branch_names()

    if off_branch not in branch_names:
        print("{0} doesn't exist. Use a branch that does.".format(
            colored.yellow(off_branch)))
        sys.exit(1)

    if new_branch in branch_names:
        print("{0} already exists. Use a unique name.".format(
            colored.yellow(new_branch)))
        sys.exit(1)


    if repo.is_dirty():
        status_log(stash_it, 'Saving local changes.')

    status_log(sprout_branch, 'Branching {0} to {1}.'.format(
        colored.yellow(off_branch), colored.yellow(new_branch)),
        off_branch, new_branch)
Removes training data from memory, keeping only the node weights,
dataset/ETHPy150Open kennethreitz/legit/legit/cli.py/cmd_sprout--crossover with--dataset/ETHPy150Open clips/pattern/pattern/vector/__init__.py/SLP.finalize