code: def create_list_strategy(
      inner_dtype: PolarsDataType | None,
      select_from: Sequence[Any] | None = None,
      size: int | None = None,
      min_size: int | None = None,
      max_size: int | None = None,
      unique: bool = False,  # noqa: FBT001
  ) -> SearchStrategy[list[Any]]:
      """
      Hypothesis strategy for producing polars List data.
  
      Parameters
      ----------
      inner_dtype : PolarsDataType
          type of the inner list elements (can also be another List).
      select_from : list, optional
          randomly select the innermost values from this list (otherwise
          the default strategy associated with the innermost dtype is used).
      size : int, optional
          if set, generated lists will be of exactly this size (and
          ignore the min_size/max_size params).
      min_size : int, optional
          set the minimum size of the generated lists (default: 0 if unset).
      max_size : int, optional
          set the maximum size of the generated lists (default: 3 if
          min_size is unset or zero, otherwise 2x min_size).
      unique : bool, optional
          ensure that the generated lists contain unique values.
  
      Examples
      --------
      Create a strategy that generates a list of i32 values:
  
      >>> lst = create_list_strategy(inner_dtype=pl.Int32)
      >>> lst.example()  # doctest: +SKIP
      [-11330, 24030, 116]
  
      Create a strategy that generates lists of lists of specific strings:
  
      >>> lst = create_list_strategy(
      ...     inner_dtype=pl.List(pl.String),
      ...     select_from=["xx", "yy", "zz"],
      ... )
      >>> lst.example()  # doctest: +SKIP
      [['yy', 'xx'], [], ['zz']]
  
      Create a UInt8 dtype strategy as a hypothesis composite that generates
      pairs of small int values where the first is always <= the second:
  
      >>> from hypothesis.strategies import composite
      >>>
      >>> @composite
      ... def uint8_pairs(draw, uints=create_list_strategy(pl.UInt8, size=2)):
      ...     pairs = list(zip(draw(uints), draw(uints)))
      ...     return [sorted(ints) for ints in pairs]
      >>> uint8_pairs().example()  # doctest: +SKIP
      [(12, 22), (15, 131)]
      >>> uint8_pairs().example()  # doctest: +SKIP
      [(59, 176), (149, 149)]
  
      """
      if select_from and inner_dtype is None:
          raise ValueError(
              "if specifying `select_from`, must also specify `inner_dtype`"
          )
  
      if inner_dtype is None:
          strats = list(_get_strategy_dtypes(base_type=True))
          shuffle(strats)
          inner_dtype = choice(strats)
      if size:
          min_size = max_size = size
      else:
          min_size = min_size or 0
          if max_size is None:
              max_size = 3 if not min_size else (min_size * 2)
  
      if inner_dtype == List:
          st = create_list_strategy(
              inner_dtype=inner_dtype.inner,  # type: ignore[union-attr]
              select_from=select_from,
              min_size=min_size,
              max_size=max_size,
          )
          if inner_dtype.inner is None and hasattr(st, "_dtype"):  # type: ignore[union-attr]
              inner_dtype = st._dtype
      else:
          st = (
              sampled_from(list(select_from))
              if select_from
              else scalar_strategies[inner_dtype]
          )
  
      ls = lists(
          elements=st,
          min_size=min_size,
          max_size=max_size,
          unique_by=(_flexhash if unique else None),
      )
      ls._dtype = List(inner_dtype)  # type: ignore[attr-defined, arg-type]
      return ls
  
imports: from __future__ import annotations
  import os
  from datetime import datetime, timedelta
  from itertools import chain
  from random import choice, shuffle
  from string import ascii_uppercase
  from typing import TYPE_CHECKING, Any, Callable, Iterator, Mapping, MutableMapping, Sequence
  from hypothesis.strategies import SearchStrategy, binary, booleans, characters, composite, dates, datetimes, decimals, floats, from_type, integers, lists, sampled_from, sets, text, timedeltas, times
  from polars.datatypes import Binary, Boolean, Categorical, Date, Datetime, Decimal, Duration, Float32, Float64, Int8, Int16, Int32, Int64, List, String, Time, UInt8, UInt16, UInt32, UInt64, is_polars_dtype
  from polars.type_aliases import PolarsDataType
  from polars.utils.deprecation import deprecate_nonkeyword_arguments
label_desc: Use image node_id 6 for calling a global function with example usage: create_list_strategy(inner_dtype, select_from, size, min_size, max_size, unique) and returns: ls