def METHOD_NAME(self, rules, evaluation: Evaluation):
    dims = None
    for rule in rules:
        pos = rule.elements[0]
        if pos.has_form("List", None):
            if dims is None:
                dims = [0] * len(pos.elements)
            for i, idx in enumerate(pos.elements):
                if isinstance(idx, Integer):
                    j = idx.get_int_value()
                    if dims[i] < j:
                        dims[i] = j
    if any(d == 0 for d in dims):
        return
    return ListExpression(*[Integer(d) for d in dims])