code: def list_of_size(*, x, size):
      """Return a list of the given length with elements drawn randomly from x.
  
      Parameters
      ----------
      x
          a list to draw elements from.
      size
          length of the list.
  
      Returns
      -------
      ret
          A strategy that draws a list.
  
      Examples
      --------
      >>> list_of_size(
      ...     x=st.sampled_from([-1, 5, 9]),
      ...     size=4,
      ... )
      [-1, 5, -1, -1]
  
      >>> list_of_size(
      ...     x=st.sampled_from([-1, 5, 9]),
      ...     size=4,
      ... )
      [9, -1, -1, -1]
  
      >>> list_of_size(
      ...     x=st.sampled_from([-1, 5, 9]),
      ...     size=4,
      ... )
      [9, 9, -1, 9]
  
      >>> list_of_size(
      ...     x=st.integers(min_value=0, max_value=4),
      ...     size=10,
      ... )
      [3, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  
      >>> list_of_size(
      ...     x=st.integers(min_value=0, max_value=4),
      ...     size=10,
      ... )
      [3, 3, 2, 4, 1, 0, 4, 2, 1, 2]
  
      >>> list_of_size(
      ...     x=st.integers(min_value=0, max_value=4),
      ...     size=10,
      ... )
      [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  
      >>> list_of_size(
      ...     x=st.booleans(),
      ...     size=3,
      ... )
      [False, False, False]
  
      >>> list_of_size(
      ...     x=st.booleans(),
      ...     size=3,
      ... )
      [True, True, False]
  
      >>> list_of_size(
      ...     x=st.booleans(),
      ...     size=3,
      ... )
      [False, True, False]
      """
      return lists(x=x, min_size=size, max_size=size)
  
imports: import numpy
  import hypothesis.extra.numpy
  from hypothesis import strategies
  from hypothesis.internal.floats import float_of
  from functools import reduce
  from operator import mul
  import sys
  import string
  import ml_dtypes
  import ivy_tests.test_ivy.helpers.globals
  from ..pipeline_helper import WithBackendContext
  import ivy_tests.test_ivy.helpers
  from ivy_tests.test_ivy.helpers.hypothesis_helpers.dtype_helpers import get_dtypes
  from .None import general_helpers
  from .None import dtype_helpers, number_helpers
  from ..globals import mod_backend
label_desc: Use image node_id 2 for calling a global function with example usage: list_of_size() and returns: lists