code: def test_transpose_arguments() -> None:
      df = pl.DataFrame({"a": [1, 2, 3], "b": [1, 2, 3]})
      expected = pl.DataFrame(
          {
              "column": ["a", "b"],
              "column_0": [1, 1],
              "column_1": [2, 2],
              "column_2": [3, 3],
          }
      )
      out = df.transpose(include_header=True)
      assert_frame_equal(expected, out)
  
      out = df.transpose(
          include_header=False, column_names=["a", "b", "c"]
      )
      expected = pl.DataFrame(
          {
              "a": [1, 1],
              "b": [2, 2],
              "c": [3, 3],
          }
      )
      assert_frame_equal(expected, out)
  
      out = df.transpose(
          include_header=True,
          header_name="foo",
          column_names=["a", "b", "c"],
      )
      expected = pl.DataFrame(
          {
              "foo": ["a", "b"],
              "a": [1, 1],
              "b": [2, 2],
              "c": [3, 3],
          }
      )
      assert_frame_equal(expected, out)
  
      def name_generator() -> Iterator[str]:
          base_name = "my_column_"
          count = 0
          while True:
              yield f"{base_name}{count}"
              count += 1
  
      out = df.transpose(
          include_header=False, column_names=name_generator()
      )
      expected = pl.DataFrame(
          {
              "my_column_0": [1, 1],
              "my_column_1": [2, 2],
              "my_column_2": [3, 3],
          }
      )
      assert_frame_equal(expected, out)
  
file_path: polars/py-polars/tests/unit/operations/test_transpose.py
imports: from datetime import date, datetime
  from typing import Iterator
  import pytest
  import polars
  from polars.exceptions import ComputeError, StringCacheMismatchError
  from polars.testing import assert_frame_equal, assert_series_equal
label_desc: Use image node_id 4 for calling a global function with example usage: test_transpose_arguments() without return types