def label_for(self, name):
        '''Get a human readable label for a method given its name'''
        method = getattr(self, name)
        if method.__doc__ and method.__doc__.strip():
            return method.__doc__.strip().splitlines()[0]
        return humanize(name.replace(self._prefix, ''))
def label_for ( self , name ) : method = getattr ( self , name ) if method . __doc__ and method . __doc__ . strip ( ) : return method . __doc__ . strip ( ) . splitlines ( ) [ 0 ] return humanize ( name . replace ( self . _prefix , '' ) )
Get a human readable label for a method given its name