class_docstr: Build a Dataset object out of Instruction instance(s).
  This reader is made for testing. It mocks file reads.
class_docstr_tok: ["Build","a","Dataset","object","out","of","Instruction","instance","(","s",")",".","This","reader","is","made","for","testing",".","It","mocks","file","reads","."]
docstr: Returns a Dataset instance from given (filename, skip, take).
docstr_tok: ["Returns","a","Dataset","instance","from","given","(","filename",",","skip",",","take",")","."]
code: def _get_table_from_filename(
      self, filename_skip_take, in_memory=False
  ):
      """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,
      )
      open(os.path.join(filename), "wb").close()
      pa_table = pa.Table.from_pydict(
          {"filename": [Path(filename).name] * 100}
      )
      if take == -1:
          take = len(pa_table) - skip
      if skip is not None and take is not None:
          pa_table = pa_table.slice(skip, take)
      return pa_table
  
imports: import os
  import tempfile
  from pathlib import Path
  from unittest import TestCase
  import pyarrow
  import pytest
  from datasets.arrow_dataset import Dataset
  from datasets.arrow_reader import ArrowReader, BaseReader, FileInstructions, ReadInstruction, make_file_instructions
  from datasets.info import DatasetInfo
  from datasets.splits import NamedSplit, Split, SplitDict, SplitInfo
  from .utils import assert_arrow_memory_doesnt_increase, assert_arrow_memory_increases
label_desc: Use image node_id 1 for calling the ReaderTest obj's underlying member method code with example usage: obj._get_table_from_filename(filename_skip_take, in_memory) and returns: pa_table