docs: def __is_function_action(self, action_function):
          """
          Detect if given function is really an action function.
  
          Args:
              action_function: Function to test.
  
          Note:
              We don't care if the variable refer to a function but rather if it is callable or not.
  
          """
          # test if function returns a couple of values
          is_function_action = True
  
          if not hasattr(action_function, '__call__'):
              return False
  
          # OK, callable. Do we receive the right arguments?
          try:
              for end_string, context in action_function():
                  if not isinstance(end_string, basestring):
                      self.log_error("Action function must return end of filename as a string as first argument")
                  if not isinstance(context, dict):
                      self.log_error("Action function must return context as a dict as second argument")
                  break
          except Exception:
              is_function_action = False
  
          return is_function_action