code: def logp_partial_gradient(self, variable, calculation_set=None):
          
          if self.verbose > 0:
              print_('\t' + self.__name__ + ': logp_partial_gradient accessed.')
  
          if not (datatypes.is_continuous(variable)
                  and datatypes.is_continuous(self)):
              return zeros(shape(variable.value))
  
          # loop through all the parameters and add up all the gradients of log p
          # with respect to the approrpiate variable
          gradient = builtins.sum(
              [child.logp_partial_gradient(self,
                                           calculation_set) for child in self.children])
  
          totalGradient = 0
          for parameter, value in six.iteritems(self.parents):
              if value is variable:
  
                  totalGradient += self.apply_jacobian(
                      parameter, variable, gradient)
  
          return np.reshape(totalGradient, shape(variable.value))
docs: gets the logp gradient of this deterministic with respect to variable