class_docstr: Dataset of a line-oriented text file.
  
  This dataset reads each line of text file(s) on every call of the
  :meth:`__getitem__` operator.
  Positions of line boundaries are cached so that you can quickliy
  random access the text file by the line number.
  
  .. note::
      Cache will be built in the constructor.
      You can pickle and unpickle the dataset to reuse the cache, but in
      that case you are responsible to guarantee that files are not
      modified after the cache has built.
  
  Args:
      paths (str or list of str):
          Path to the text file(s).
          If it is a string, this dataset reads a line from the text file
          and emits it as :class:`str`.
          If it is a list of string, this dataset reads lines from each
          text file and emits it as a tuple of :class:`str`. In this case,
          number of lines in all files must be the same.
      encoding (str or list of str):
          Name of the encoding used to decode the file.
          See the description in :func:`open` for the supported options and
          how it works.
          When reading from multiple text files, you can also pass a list of
          :class:`str` to use different encoding for each file.
      errors (str or list of str):
          String that specifies how decoding errors are to be handled.
          See the description in :func:`open` for the supported options and
          how it works.
          When reading from multiple text files, you can also pass a list of
          :class:`str` to use different error handling policy for each file.
      newline (str or list of str):
          Controls how universal newlines mode works.
          See the description in :func:`open` for the supported options and
          how it works.
          When reading from multiple text files, you can also pass a list of
          :class:`str` to use different mode for each file.
      filter_func (callable):
          Function to filter each line of the text file.
          It should be a function that takes number of arguments equals to
          the number of files. Arguments are lines loaded from each file.
          The filter function must return True to accept the line, or
          return False to skip the line.
code: def __setstate__(self, state):
      self.__dict__ = state
      self._open()
      self._lock = threading.Lock()
  
file_path: chainer/chainer/datasets/text_dataset.py
imports: import io
  import sys
  import threading
  import six
  from chainer.dataset import dataset_mixin
label_desc: Use image node_id 3 for calling the TextDataset obj's underlying member method code with example usage: obj.__setstate__(state) without return types