code: def divide(n, m):
      
      avg = int(n / m)
      remain = n - m * avg
      data = list(itertools.repeat(avg, m))
      for i in range(len(data)):
          if not remain:
              break
          data[i] += 1
          remain -= 1
      return data
docs: Divide integer n to m chunks