code: def record_action(self, method_name, *args, **kwargs):
          
          self.actions.append((method_name, args, kwargs))
docs: Record the method-calling action.
  
          The actions expect to be played on an target object.
  
          :param method_name: the name of called method.
          :param args: the general arguments for calling method.
          :param kwargs: the keyword arguments for calling method.