def METHOD_NAME(node):
    template = 'templatefile("pipeline.yml.tpl", {'
    steps = yaml.safe_load(node['steps']['yaml'])
    if 'env' in steps:
        envs = steps['env']
        envs = json.dumps(envs)
        envs = envs.replace("\"", "\\\"")
        template += f' envs = jsondecode("{envs}"),'
    else:
        template += " envs = {},"
    template += " steps = {"
    commands = steps['steps'][0]['command'].split('\n')
    commands = json.dumps(commands)
    template += f' commands = {commands}'
    label = steps['steps'][0]['label']
    if label != ':pipeline:':
        template += f', label = "{label}"'
    template += " } })"
    return template