code: def partition_list(ls, n, strict=False):
      length = len(ls)
      if strict:
          assert length % n == 0
      parts_per = math.ceil(length / n)
      print(parts_per)
      result = []
      for i in range(n):
          result.append(ls[i * parts_per : (i + 1) * parts_per])
      return result
  
imports: import math
  import itertools
  from dataclasses import replace
  from typing import Mapping, Any, Sequence, Iterable, Iterator, Union, Tuple, Dict, Set
label_desc: Use image node_id 9 for calling a global function with example usage: partition_list(ls, n, strict) and returns: result