class_docstr: FileReader
  
  Read dataset from several data sources.
  Supported data sources are,
  
  * Local file (file or directory name)
  * HTTP/HTTPS (URI)
  * S3         (URI with s3:// prefix)
  
  Currently HTTP/HTTPS source does not support CACHE input because
  there is no standard way to get directory entry with
  HTTP/HTTPS/protocol.
  
  
  To access S3 data, you must specify credentials with environment
  variable.
  
  For example,
  
  ::
  
      $ export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
      $ export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
  
  Or, you can specify PROFILE with following.
  
  ::
  
      $ export AWS_DEFAULT_PROFILE=my_profile
class_docstr_tok: ["FileReader","Read","dataset","from","several","data","sources",".","Supported","data","sources","are",",","*","Local","file","(","file","or","directory","name",")","*","HTTP\/HTTPS","(","URI",")","*","S3","(","URI","with","s3",":","\/\/","prefix",")","Currently","HTTP\/HTTPS","source","does","not","support","CACHE","input","because","there","is","no","standard","way","to","get","directory","entry","with","HTTP\/HTTPS\/protocol",".","To","access","S3","data",",","you","must","specify","credentials","with","environment","variable",".","For","example",",",":",":","$","export","AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE","$","export","AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI\/K7MDENG\/bPxRfiCYEXAMPLEKEY","Or",",","you","can","specify","PROFILE","with","following",".",":",":","$","export","AWS_DEFAULT_PROFILE=my_profile"]
code: def __init__(self, base_uri):
      self._base_uri = base_uri
      self.base_ext = os.path.splitext(self._base_uri)[1].lower()
      if base_uri[0:5].lower() == "s3://":
          self._file_type = "s3"
          uri_header, uri_body = self._base_uri.split("://", 1)
          us = uri_body.split("/")
          bucketname = us.pop(0)
          self._s3_base_key = "/".join(us)
          logger.info(
              "Creating session for S3 bucket {}".format(bucketname)
          )
  
          import boto3
  
          self._s3_bucket = (
              boto3.session.Session().resource("s3").Bucket(bucketname)
          )
  
      elif (
          base_uri[0:7].lower() == "http://"
          or base_uri[0:8].lower() == "https://"
      ):
          self._file_type = "http"
      else:
          self._file_type = "file"
  
imports: from __future__ import absolute_import
  import contextlib
  import csv
  import warnings
  from six import BytesIO
  from six import StringIO
  from six.moves import map
  from six.moves.urllib.parse import urljoin
  import h5py
  import numpy
  import scipy.io.wavfile
  import os
  import urllib.request
  import six
  import tempfile
  import binascii
  from shutil import rmtree
  from nnabla.utils.image_utils import imresize, imread
  from nnabla.utils.audio_utils import auresize, auread
  from nnabla.logger import logger
  from .download import download, get_data_home
label_desc: Use image node_id 1 to create a new FileReader object  with example: obj = FileReader(base_uri)