
    Design a function that determines the total number of viable synchronized monitoring intervals (in seconds) when tracking two different vital signs measured at frequencies of a seconds and b seconds respectively, where synchronized intervals are time points when both measurements coincide. For example, if vital sign A is measured every 12 seconds and vital sign B every 18 seconds, the function should calculate the sum of all time intervals (common divisors) at which both measurements will occur simultaneously.
    

    
def sum(a, b):
    """
    Design a function that determines the total number of viable synchronized monitoring intervals (in seconds) when tracking two different vital signs measured at frequencies of a seconds and b seconds respectively, where synchronized intervals are time points when both measurements coincide. For example, if vital sign A is measured every 12 seconds and vital sign B every 18 seconds, the function should calculate the sum of all time intervals (common divisors) at which both measurements will occur simultaneously.
    

    """
def sum(a, b):
    """
    Design a function that determines the total number of viable synchronized monitoring intervals (in seconds) when tracking two different vital signs measured at frequencies of a seconds and b seconds respectively, where synchronized intervals are time points when both measurements coincide. For example, if vital sign A is measured every 12 seconds and vital sign B every 18 seconds, the function should calculate the sum of all time intervals (common divisors) at which both measurements will occur simultaneously.
    

    """
    sum = 0
    for i in range(1, min(a, b)):
        if a % i == 0 and b % i == 0:
            sum += i
    return sum