class_docstr: List methods for Series
class_docstr_tok: ["List","methods","for","Series"]
docstr: Collect list elements based on given indices.
  
  Parameters
  ----------
  lists_indices: Series-like of lists
      Specifies what to collect from each row
  
  Returns
  -------
  Series or Index
  
  Examples
  --------
  >>> s = cudf.Series([[1, 2, 3], None, [4, 5]])
  >>> s
  0    [1, 2, 3]
  1         None
  2       [4, 5]
  dtype: list
  >>> s.list.take([[0, 1], [], []])
  0    [1, 2]
  1      None
  2        []
  dtype: list
docstr_tok: ["Collect","list","elements","based","on","given","indices",".","Parameters","--","--","--","--","--","lists_indices",":","Series-like","of","lists","Specifies","what","to","collect","from","each","row","Returns","--","--","--","-","Series","or","Index","Examples","--","--","--","--",">",">",">","s","=","cudf.Series","(","[","[","1",",","2",",","3","]",",","None",",","[","4",",","5","]","]",")",">",">",">","s","0","[","1",",","2",",","3","]","1","None","2","[","4",",","5","]","dtype",":","list",">",">",">","s.list.take","(","[","[","0",",","1","]",",","[","]",",","[","]","]",")","0","[","1",",","2","]","1","None","2","[","]","dtype",":","list"]
code: def take(self, lists_indices: ColumnLike) -> ParentType:
      """
      Collect list elements based on given indices.
  
      Parameters
      ----------
      lists_indices: Series-like of lists
          Specifies what to collect from each row
  
      Returns
      -------
      Series or Index
  
      Examples
      --------
      >>> s = cudf.Series([[1, 2, 3], None, [4, 5]])
      >>> s
      0    [1, 2, 3]
      1         None
      2       [4, 5]
      dtype: list
      >>> s.list.take([[0, 1], [], []])
      0    [1, 2]
      1      None
      2        []
      dtype: list
      """
  
      lists_indices_col = as_column(lists_indices)
      if not isinstance(lists_indices_col, ListColumn):
          raise ValueError("lists_indices should be list type array.")
      if not lists_indices_col.size == self._column.size:
          raise ValueError(
              "lists_indices and list column is of different " "size."
          )
      if not _is_non_decimal_numeric_dtype(
          lists_indices_col.children[1].dtype
      ) or not np.issubdtype(
          lists_indices_col.children[1].dtype, np.integer
      ):
          raise TypeError(
              "lists_indices should be column of values of index types."
          )
  
      return self._return_or_inplace(
          segmented_gather(self._column, lists_indices_col)
      )
  
imports: from __future__ import annotations
  from functools import cached_property
  from typing import List, Optional, Sequence, Tuple, Union
  import numpy
  import pyarrow
  from typing_extensions import Self
  import cudf
  from cudf._lib.copying import segmented_gather
  from cudf._lib.lists import concatenate_list_elements, concatenate_rows, contains_scalar, count_elements, distinct, extract_element_column, extract_element_scalar, index_of_column, index_of_scalar, sort_lists
  from cudf._lib.strings.convert.convert_lists import format_list_column
  from cudf._lib.types import size_type_dtype
  from cudf._typing import ColumnBinaryOperand, ColumnLike, Dtype, ScalarLike
  from cudf.api.types import _is_non_decimal_numeric_dtype, is_scalar
  from cudf.core.column import ColumnBase, as_column, column
  from cudf.core.column.methods import ColumnMethods, ParentType
  from cudf.core.dtypes import ListDtype
  from cudf.core.missing import NA
label_desc: Use image node_id 7 for calling the ListMethods obj's underlying member method code with example usage: obj.take(lists_indices) and returns: self