<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def resolve_is_aggregate(values):
 """ Resolves the is_aggregate flag for an expression that contains multiple terms. This works like a voter system, each term votes True or False or abstains with None. :param values: A list of booleans (or None) for each term in the expression :return: If all values are True or None, True is returned. If all values are None, None is returned. Otherwise, False is returned. """

    result = [x
              for x in values
              if x is not None]
    if result:
        return all(result)
    return None