def _get_max_size(parts, size=1):
    """ Given a list of parts, find the maximum number of commands
    contained in it.
    """
    max_group_size = 0
    for part in parts:
        if isinstance(part, list):
            group_size = 0
            for input_group in part:
                group_size += 1

            if group_size > max_group_size:
                max_group_size = group_size

    magic_size = _get_magic_size(parts)
    return max_group_size * magic_size
def _get_max_size ( parts , size = 1 ) : max_group_size = 0 for part in parts : if isinstance ( part , list ) : group_size = 0 for input_group in part : group_size += 1 if group_size > max_group_size : max_group_size = group_size magic_size = _get_magic_size ( parts ) return max_group_size * magic_size
Given a list of parts, find the maximum number of commands
    contained in it.