code: def __init__(
      self,
      filepath_or_buffer,
      index=None,
      encoding="ISO-8859-1",
      chunksize=None,
  ):
      self._encoding = encoding
      self._lines_read = 0
      self._index = index
      self._chunksize = chunksize
  
      if isinstance(filepath_or_buffer, str):
          (
              filepath_or_buffer,
              encoding,
              compression,
              should_close,
          ) = get_filepath_or_buffer(
              filepath_or_buffer, encoding=encoding
          )
  
      if isinstance(filepath_or_buffer, (str, compat.text_type, bytes)):
          self.filepath_or_buffer = open(filepath_or_buffer, "rb")
      else:
          # Copy to BytesIO, and ensure no encoding
          contents = filepath_or_buffer.read()
          try:
              contents = contents.encode(self._encoding)
          except UnicodeEncodeError:
              pass
          self.filepath_or_buffer = compat.BytesIO(contents)
  
      self._read_header()
  
imports: from datetime import datetime
  import struct
  import warnings
  import numpy
  from pandas.util._decorators import Appender
  import pandas
  from pandas import compat
  from pandas.io.common import BaseIterator, get_filepath_or_buffer
label_desc: Use image node_id 1 to create a new XportReader object from inherited base classes: BaseIterator with example: obj = XportReader(filepath_or_buffer, index, encoding, chunksize)