def concatenate_script(list_ur_commands):
    """
    Internal function that concatenates generated UR script into one large script file. Usually used to combine
    scripts generated by the GrasshopperPython components

    Args:
        list_ur_commands: A list of formatted UR Script strings

    Returns:
        ur_script: The concatenated script
    """

    ur_script = "\ndef my_script():\n"
    #ur_script += '\tpopup("running my_script")\n'

    combined_script = ""
    for ur_cmd in list_ur_commands:
        combined_script += ur_cmd

    #format combined script
    lines =  combined_script.split("\n")
    for l in lines:
        ur_script += "\t" + l + "\n"

    ur_script += 'end\n'
    ur_script += '\nmy_script()\n'
    return ur_script