code: def test_partition():
      """Various unittests of partition."""
  
      # partitioning by 1 generates singletons.
      assert list(u.partition([1, 2, 3, 4, 5], 1)) == [
          [1],
          [2],
          [3],
          [4],
          [5],
      ]
  
      # partition works into groups of 2
      assert list(u.partition([1, 2, 3, 4], 2)) == [
          [1, 2],
          [2, 3],
          [3, 4],
      ]
  
      # >= case
      assert list(u.partition([1, 2, 3], 3)), [[1, 2, 3]]
      assert list(u.partition([1, 2, 3], 10)) == [[1, 2, 3]]
  
imports: import itertools
  import json
  import os
  import uuid
  from collections import OrderedDict
  from enum import Enum
  from typing import Union
  import hypothesis.strategies
  from hypothesis import given
  import caliban.util
  import pytest
label_desc: Use image node_id 20 for calling a global function with example usage: test_partition() without return types