code: def check_path_exists_foreach(path_params, func):
      
      @wraps(func)
      def wrapper(*args):
          self = args[0]
          params = args[1]
  
          if not self.in_transaction:
              for name in path_params:
                  value = getattr(params, name)
                  paths = value if type(value) == list else [value]
                  resolved = []
                  for path in paths:
                      path = self.resolve_path(path)
                      if not self.client.exists(path):
                          self.show_output("Path %s doesn't exist", path)
                          return False
                      resolved.append(path)
  
                  if type(value) == list:
                      setattr(params, name, resolved)
                  else:
                      setattr(params, name, resolved[0])
  
          return func(self, params)
  
      return wrapper
docs: check that paths exist (unless we are in a transaction)