code: def add_properties(self, names, methods):
          
          cls = type(self)
          cls = type(cls.__name__, (cls,), dict(cls.__dict__))
          if isinstance(names, string_types):
              names = [names]
              methods = [methods]
          for name,method in zip(names, methods):
              setattr(cls, name, property(method))
          return self.view(type=cls)
docs: Returns a view of self with the given methods added as properties.
  
          From: <http://stackoverflow.com/a/2954373/1366472>.