# This file was auto generated by Styx.
# Do not edit this file directly.

import typing
import pathlib
from styxdefs import *
import dataclasses

ADJUNCT_SIMPLIFY_COST_METADATA = Metadata(
    id="0291c293f6b2eaf6626f15fdc0c7c7079ef500e7.boutiques",
    name="adjunct_simplify_cost",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class AdjunctSimplifyCostOutputs(typing.NamedTuple):
    """
    Output object returned when calling `adjunct_simplify_cost(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""


def adjunct_simplify_cost(
    cost_function: str,
    runner: Runner | None = None,
) -> AdjunctSimplifyCostOutputs:
    """
    Simplifies a cost function name by removing the '+' and anything following it.
    
    Author: AFNI Developers
    
    URL: https://afni.nimh.nih.gov/
    
    Args:
        cost_function: The cost function name to be simplified.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `AdjunctSimplifyCostOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(ADJUNCT_SIMPLIFY_COST_METADATA)
    cargs = []
    cargs.append("adjunct_simplify_cost.py")
    cargs.append(cost_function)
    ret = AdjunctSimplifyCostOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "ADJUNCT_SIMPLIFY_COST_METADATA",
    "AdjunctSimplifyCostOutputs",
    "adjunct_simplify_cost",
]
