class_docstr: Module transforms specific datastore content and writes it to a file.
code: def transform(self, data):
      data = copy.deepcopy(data)
  
      # if a transformation function is provided, transform the data
      if self.apply_func is not None:
          data = self.apply_func(data, **self.kwargs)
  
      # if file path is provided, write data to a file. Otherwise, write data into the datastore
      if self.file_path is None:
          return data
  
      with open(self.file_path, "w+") as file:
          file.write(data)
      self.logger.info(
          f'Object "{self.read_key}" written to file "{self.file_path}".'
      )
      return None
  
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 3 for calling the FileWriter obj's underlying member method code with example usage: obj.transform(data) and returns: None, data