def METHOD_NAME(args, subtree_info):
    external_ref = None
    if not args.external_ref:
        external_ref = subtree_info.default_external_ref
    print(
        "Component: {:<15} Path: {:<30} URL: {:<45} URL_Ref: {}".format(
            subtree_info.name, subtree_info.internal_path, subtree_info.external_url, external_ref
        )
    )
    if args.list:
        return  # List only
    else:
        assert args.update
    assert (
        args.message
    ), "Must provide a commit message (-m/--message) describing why component is being updated"
    assert external_ref != None
    action = None
    message = None
    if not os.path.exists(subtree_info.internal_path):
        # Create
        action = "add"
        message = (
            "{msg}\n\n{name}: Adding '{path}/' as an external git subtree from {url} {rev}".format(
                name=subtree_info.name,
                path=subtree_info.internal_path,
                url=subtree_info.external_url,
                rev=external_ref,
                msg=args.message,
            )
        )
    else:
        # Pull
        action = "pull"
        message = (
            "{msg}\n\n{name}: Updating '{path}/' (external git subtree from {url} {rev})".format(
                name=subtree_info.name,
                path=subtree_info.internal_path,
                url=subtree_info.external_url,
                rev=external_ref,
                msg=args.message,
            )
        )
    assert action != None
    assert message != None
    cmd = "git subtree {action} --prefix {internal_path} {external_url} {external_branch} --squash --message '{message}'".format(
        action=action,
        internal_path=subtree_info.internal_path,
        external_url=subtree_info.external_url,
        external_branch=external_ref,
        message=message,
    )
    if args.dry_run:
        print(cmd)
    else:
        os.system(cmd)