def partition_list(arr, m):
    """Split the list `arr` into `m` pieces"""
    n = int(math.ceil(len(arr) / float(m)))
    return [arr[i:i + n] for i in range(0, len(arr), n)]
Split the list `arr` into `m` pieces
contrib/PanopticSeg/paddlepanseg/core/predict.py