def set_digital_out(id, signal):
    """
    Function that returns UR script for setting digital out
    
    Args:
        id: int. Input id number
        signal: boolean. signal level - on or off
    
    Returns:
        script: UR script
    """
    
    # Format UR script
    script = "set_digital_out(%s,%s)\n"%(id,signal)
    return script