code: def create_nonimplemented_method(op_name, klass):
      
  
      def new_method(self, *args):
          raise NotImplementedError(
              'Special method %s has not been implemented for PyMC variables.' %
              op_name)
      new_method.__name__ = '__' + op_name + '__'
      setattr(
          klass,
          new_method.__name__,
          UnboundMethodType(
              new_method,
              None,
              klass))
docs: Creates a new method that raises NotImplementedError.