original_docstring: 
      Query a pyarrow Table to extract the subtable that correspond to the given key.
      The :obj:`indices` parameter corresponds to the indices mapping in case we cant to take into
      account a shuffling or an indices selection for example.
      The indices table must contain one column named "indices" of type uint64.
      
docstring: Query a pyarrow Table to extract the subtable that correspond to the given key.
  The :obj:`indices` parameter corresponds to the indices mapping in case we cant to take into
  account a shuffling or an indices selection for example.
  The indices table must contain one column named "indices" of type uint64.
docstring_tokens: Query a pyarrow Table to extract the subtable that correspond to the given key . The : obj : ` indices ` parameter corresponds to the indices mapping in case we cant to take into account a shuffling or an indices selection for example . The indices table must contain one column named " indices " of type uint64 .
code: def _query_table_with_indices_mapping(
      table: Table, key: Union[int, slice, range, str, Iterable], indices: Table
  ) -> pa.Table:
      """
      Query a pyarrow Table to extract the subtable that correspond to the given key.
      The :obj:`indices` parameter corresponds to the indices mapping in case we cant to take into
      account a shuffling or an indices selection for example.
      The indices table must contain one column named "indices" of type uint64.
      """
      if isinstance(key, int):
          key = indices.fast_slice(key % indices.num_rows, 1).column(0)[0].as_py()
          return _query_table(table, key)
      if isinstance(key, slice):
          key = range(*key.indices(table.num_rows))
      if isinstance(key, range):
          if _is_range_contiguous(key) and key.start >= 0:
              return _query_table(
                  table, [i.as_py() for i in indices.fast_slice(key.start, key.stop - key.start).column(0)]
              )
          else:
              pass  # treat as an iterable
      if isinstance(key, str):
          table = table.drop([column for column in table.column_names if column != key])
          return _query_table(table, indices.column(0).to_pylist())
      if isinstance(key, Iterable):
          return _query_table(table, [indices.fast_slice(i, 1).column(0)[0].as_py() for i in key])
  
      _raise_bad_key_type(key)
code_tokens: def _query_table_with_indices_mapping ( table : Table , key : Union [ int , slice , range , str , Iterable ] , indices : Table ) -> pa . Table : if isinstance ( key , int ) : key = indices . fast_slice ( key % indices . num_rows , 1 ) . column ( 0 ) [ 0 ] . as_py ( ) return _query_table ( table , key ) if isinstance ( key , slice ) : key = range ( * key . indices ( table . num_rows ) ) if isinstance ( key , range ) : if _is_range_contiguous ( key ) and key . start >= 0 : return _query_table ( table , [ i . as_py ( ) for i in indices . fast_slice ( key . start , key . stop - key . start ) . column ( 0 ) ] ) else : pass if isinstance ( key , str ) : table = table . drop ( [ column for column in table . column_names if column != key ] ) return _query_table ( table , indices . column ( 0 ) . to_pylist ( ) ) if isinstance ( key , Iterable ) : return _query_table ( table , [ indices . fast_slice ( i , 1 ) . column ( 0 ) [ 0 ] . as_py ( ) for i in key ] ) _raise_bad_key_type ( key )
short_docstring: Query a pyarrow Table to extract the subtable that correspond to the given key.
short_docstring_tokens: Query a pyarrow Table to extract the subtable that correspond to the given key .
comment: """
      Query a pyarrow Table to extract the subtable that correspond to the given key.
      The :obj:`indices` parameter corresponds to the indices mapping in case we cant to take into
      account a shuffling or an indices selection for example.
      The indices table must contain one column named "indices" of type uint64.
      """$SEP$# treat as an iterable