def _padding_format_convert(padding: list):
    """Convert Onnx padding format to Mindspore"""
    num = len(padding)
    if num % 2 != 0:
        raise ValueError(f"Padding list should be even length but got {num}")

    low = 0
    mid = num // 2
    lst = []
    ms_pad_front = low
    ms_pad_back = mid
    while ms_pad_front < mid and ms_pad_back < num:
        lst.append((padding[ms_pad_front], padding[ms_pad_back]))
        ms_pad_front += 1
        ms_pad_back += 1

    return tuple(lst)