class_docstr: Build a Dataset object out of Instruction instance(s).
  This Reader uses memory mapping on parquet files.
class_docstr_tok: ["Build","a","Dataset","object","out","of","Instruction","instance","(","s",")",".","This","Reader","uses","memory","mapping","on","parquet","files","."]
docstr: Returns a Dataset instance from given (filename, skip, take).
code: def _get_table_from_filename(self, filename_skip_take, **kwargs):
      """Returns a Dataset instance from given (filename, skip, take)."""
      filename, skip, take = (
          filename_skip_take["filename"],
          filename_skip_take["skip"]
          if "skip" in filename_skip_take
          else None,
          filename_skip_take["take"]
          if "take" in filename_skip_take
          else None,
      )
      # Parquet read_table always loads data in memory, independently of memory_map
      pa_table = pq.read_table(filename, memory_map=True)
      # here we don't want to slice an empty table, or it may segfault
      if (
          skip is not None
          and take is not None
          and not (skip == 0 and take == len(pa_table))
      ):
          pa_table = pa_table.slice(skip, take)
      return pa_table
  
imports: import copy
  import math
  import os
  import re
  import shutil
  from dataclasses import dataclass
  from pathlib import Path
  from typing import TYPE_CHECKING, List, Optional, Union
  import pyarrow
  import pyarrow.parquet
  from .download.download_config import DownloadConfig
  from .naming import _split_re, filenames_for_dataset_split
  from .table import InMemoryTable, MemoryMappedTable, Table, concat_tables
  from .utils import logging
  from .utils.file_utils import cached_path
label_desc: Use image node_id 2 for calling the ParquetReader obj's underlying member method code with example usage: obj._get_table_from_filename(filename_skip_take) and returns: pa_table