class_docstr: Module transforms specific datastore content and writes it to a file.
docstr: Initialize an instance.
  
  :param str read_key: key of input histogram-dict to read from data store
  :param str store_key: key of output data to store in data store (optional)
  :param str file_path: the file path where to output the report (optional)
  :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`
docstr_tok: ["Initialize","an","instance",".",":","param","str","read_key",":","key","of","input","histogram-dict","to","read","from","data","store",":","param","str","store_key",":","key","of","output","data","to","store","in","data","store","(","optional",")",":","param","str","file_path",":","the","file","path","where","to","output","the","report","(","optional",")",":","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,
      read_key: str,
      store_key: str | None = None,
      file_path: str | Path | None = None,
      apply_func: Callable | None = None,
      **kwargs,
  ) -> None:
      """Initialize an instance.
  
      :param str read_key: key of input histogram-dict to read from data store
      :param str store_key: key of output data to store in data store (optional)
      :param str file_path: the file path where to output the report (optional)
      :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 file_path is not None and 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.read_key = read_key
      self.store_key = store_key or read_key
  
      self.file_path = file_path
      self.apply_func = apply_func
      self.kwargs = kwargs
  
file_path: popmon/popmon/io/file_writer.py
imports: from __future__ import annotations
  import copy
  from pathlib import Path
  from typing import Callable
  from popmon.base import Module
label_desc: Use image node_id 1 to create a new FileWriter object from inherited base classes: Module with example: obj = FileWriter(read_key, store_key, file_path, apply_func)