def _update_steps(function_name, caller_line, args=None, template_name=None):
    '\n    A step in Argo YAML contains name, related template and parameters.\n    Here we insert a single step into the global steps.\n    '
    function_id = utils.invocation_name(function_name, caller_line)
    if states._update_steps_lock:
        name = function_id
        if states._run_concurrent_lock:
            _id = utils.invocation_name(template_name, caller_line)
            name = ('%s-%s' % (_id, states._concurrent_func_id))
            if (states._sub_steps is not None):
                states._concurrent_func_id = (states._concurrent_func_id + 1)
        t_name = (function_name if (template_name is None) else template_name)
        step = Step(name=name, template=t_name)
        if (states._when_prefix is not None):
            step.when = states._when_prefix
        if (args is not None):
            (parameters, artifacts) = _get_params_and_artifacts_from_args(args, (template_name if states._run_concurrent_lock else function_name), prefix='steps')
            if (len(parameters) > 0):
                step.arguments = OrderedDict()
                step.arguments['parameters'] = parameters
            if (len(artifacts) > 0):
                if (step.arguments is None):
                    step.arguments = OrderedDict()
                step.arguments['artifacts'] = artifacts
        if (states._condition_id is not None):
            function_id = states._condition_id
        if states._while_lock:
            if (function_id in states._while_steps):
                states._while_steps.get(function_id).append(step.to_dict())
            else:
                states._while_steps[function_id] = [step.to_dict()]
        elif (states._sub_steps is not None):
            if (function_id in states._sub_steps):
                states._sub_steps.get(function_id).append(step.to_dict())
            else:
                states._sub_steps[function_id] = [step.to_dict()]
        elif (states._exit_handler_enable is True):
            if (function_id in states.workflow.exit_handler_step):
                states.workflow.exit_handler_step.get(function_id).append(step.to_dict())
            else:
                states.workflow.exit_handler_step[function_id] = [step.to_dict()]
        else:
            states.workflow.add_step(function_id, step)
        return step.name
    else:
        return function_id
A step in Argo YAML contains name, related template and parameters.
Here we insert a single step into the global steps.
def _update_steps(function_name, caller_line, args=None, template_name=None):
    '\n    A step in Argo YAML contains name, related template and parameters.\n    Here we insert a single step into the global steps.\n    '
    function_id = utils.invocation_name(function_name, caller_line)
    if states._update_steps_lock:
        name = function_id
        if states._run_concurrent_lock:
            _id = utils.invocation_name(template_name, caller_line)
            name = ('%s-%s' % (_id, states._concurrent_func_id))
            if (states._sub_steps is not None):
                states._concurrent_func_id = (states._concurrent_func_id + 1)
        t_name = (function_name if (template_name is None) else template_name)
        step = Step(name=name, template=t_name)
        if (states._when_prefix is not None):
            step.when = states._when_prefix
        if (args is not None):
            (parameters, artifacts) = _get_params_and_artifacts_from_args(args, (template_name if states._run_concurrent_lock else function_name), prefix='steps')
            if (len(parameters) > 0):
                step.arguments = OrderedDict()
                step.arguments['parameters'] = parameters
            if (len(artifacts) > 0):
                if (step.arguments is None):
                    step.arguments = OrderedDict()
                step.arguments['artifacts'] = artifacts
        if (states._condition_id is not None):
            function_id = states._condition_id
        if states._while_lock:
            if (function_id in states._while_steps):
                states._while_steps.get(function_id).append(step.to_dict())
            else:
                states._while_steps[function_id] = [step.to_dict()]
        elif (states._sub_steps is not None):
            if (function_id in states._sub_steps):
                states._sub_steps.get(function_id).append(step.to_dict())
            else:
                states._sub_steps[function_id] = [step.to_dict()]
        elif (states._exit_handler_enable is True):
            if (function_id in states.workflow.exit_handler_step):
                states.workflow.exit_handler_step.get(function_id).append(step.to_dict())
            else:
                states.workflow.exit_handler_step[function_id] = [step.to_dict()]
        else:
            states.workflow.add_step(function_id, step)
        return step.name
    else:
        return function_id