code: def gradient(self):
          
          try:
              op_to_return = self.functional.gradient
          except NotImplementedError:
              raise NotImplementedError(
                  '`self.functional.gradient` is not implemented for '
                  '`self.functional` {}'.format(self.functional))
  
          op_to_return = op_to_return - ConstantOperator(self.subgrad)
          return op_to_return
docs: Gradient operator of the functional.