from typing import List
from typing import Any


def get_avg(values: List[Any]):
    """Get average value of a list.

    Args:
        values: A list of values.

    Returns:
        The average value in the list.
    """
    valid_total = len(values)
    running_sum = 0.0

    for value in values:
        if value == -1:
            valid_total -= 1
            continue
        running_sum += value

    if valid_total == 0:
        return -1
    return running_sum / valid_total