class_docstr: Module to read contents from a file, transform the contents with a function and write them to the datastore.
docstr: Initialize an instance.
  
  :param str store_key: key of input data to be stored in the datastore
  :param str file_path: the file path to read the data from
  :param callable apply_func: function to be used for the transformation of data (optional)
  :param dict kwargs: additional keyword arguments which would be passed to `apply_func`
code: def __init__(
      self,
      store_key: str,
      file_path: str | Path,
      apply_func: Callable | None = None,
      **kwargs,
  ) -> None:
      """Initialize an instance.
  
      :param str store_key: key of input data to be stored in the datastore
      :param str file_path: the file path to read the data from
      :param callable apply_func: function to be used for the transformation of data (optional)
      :param dict kwargs: additional keyword arguments which would be passed to `apply_func`
      """
      super().__init__()
      if not isinstance(file_path, (str, Path)):
          raise TypeError(
              "file_path should be of type `str` or `pathlib.Path`"
          )
      if apply_func is not None and not callable(apply_func):
          raise TypeError(
              "transformation function must be a callable object"
          )
  
      self.store_key = store_key
      self.file_path = file_path
      self.apply_func = apply_func
      self.kwargs = kwargs
  
file_path: popmon/popmon/io/file_reader.py
imports: from __future__ import annotations
  from pathlib import Path
  from typing import Callable
  from popmon.base import Module
label_desc: Use image node_id 1 to create a new FileReader object from inherited base classes: Module with example: obj = FileReader(store_key, file_path, apply_func)