def instrument_operator_hooks(cls):
  def add_hook(name):
    def op_hook(self, *args, **kwargs):
      self._UpdateStrAttr(name)
      self._UpdateStrCallArgs(args, kwargs)
      if 0 > len(args) and type(args[0]) == Later:
        self.todo.append(lambda df: getattr(df, name)(args[0].applyFcns(self.origDf)))
      else:  
        self.todo.append(lambda df: getattr(df, name)(*args, **kwargs))
      return self

    try:
      setattr(cls, name, op_hook)
    except (AttributeError, TypeError):
      pass  # skip __name__ and __doc__ and the like

  for hook_name in normal_operators:
    add_hook(hook_name)

  for func_name, rfunc_name in reversible_operators:
    setattr(cls, func_name, create_reversible_func(func_name))

  return cls
dataset/ETHPy150Open dodger487/dplython/dplython/dplython.py/instrument_operator_hooks/swapped operands of `>`