code: def to_numpy(
      self, columns: Optional[Union[str, List[str]]] = None
  ) -> Union[np.ndarray, Dict[str, np.ndarray]]:
      if columns is None:
          columns = self._table.columns.tolist()
          should_be_single_ndarray = False
      elif isinstance(columns, list):
          should_be_single_ndarray = False
      else:
          columns = [columns]
          should_be_single_ndarray = True
  
      for column in columns:
          if column not in self._table.columns:
              raise ValueError(
                  f"Cannot find column {column}, available columns: "
                  f"{self._table.columns.tolist()}"
              )
  
      arrays = []
      for column in columns:
          arrays.append(self._table[column].to_numpy())
  
      if should_be_single_ndarray:
          arrays = arrays[0]
      else:
          arrays = dict(zip(columns, arrays))
      return arrays
  
imports: import collections
  import heapq
  from typing import TYPE_CHECKING, Any, Callable, Dict, Iterator, List, Optional, Tuple, TypeVar, Union
  import numpy
  from ray.air.constants import TENSOR_COLUMN_NAME
  from ray.data._internal.table_block import TableBlockAccessor, TableBlockBuilder
  from ray.data._internal.util import find_partitions
  from ray.data.block import Block, BlockAccessor, BlockExecStats, BlockMetadata, KeyType, U
  from ray.data.context import DataContext
  from ray.data.row import TableRow
label_desc: Use image node_id 11 for calling the PandasBlockAccessor obj's underlying member method code with example usage: obj.to_numpy(columns) and returns: arrays