code: def datastore_helper(func):
      """Decorator for passing and storing only the relevant keys in the datastore to
      the transform() method."""
  
      @wraps(func)
      def _transform(self, datastore):
          """Transformation helper function"""
          inputs = {}
          self.logger.debug(f"load from: {type(self)}")
          for key in self._input_keys:
              key_value = self.__dict__[key]
              if key_value and len(key_value) > 0:
                  if isinstance(key_value, list):
                      inputs[key] = [
                          datastore.get(k) for k in key_value
                      ]
                  else:
                      inputs[key] = datastore.get(key_value)
              else:
                  inputs[key] = None
  
              self.logger.debug(
                  "load(key=%s, key_value=%s, value=%.100s})",
                  key,
                  key_value,
                  inputs[key],
              )
  
          # transformation
          outputs = func(self, *list(inputs.values()))
  
          # transform returns None if no update needs to be made
          if outputs is not None:
              if len(self._output_keys) == 1:
                  outputs = (outputs,)
  
              for k, v in zip(self._output_keys, outputs):
                  key_value = self.__dict__[k]
                  self.logger.debug(
                      "store(key=%s, key_value=%s, value=%.100s)",
                      k,
                      key_value,
                      v,
                  )
                  if key_value and len(key_value) > 0:
                      datastore[key_value] = v
  
          return datastore
  
      return _transform
  
imports: from __future__ import annotations
  import logging
  from abc import ABCMeta
  from functools import wraps
label_desc: Use image node_id 1 for calling a global function with example usage: datastore_helper(func) and returns: _transform, datastore