'Return a given action from a parameter, which can either be a callable,
or the name of a method on the ModelAdmin.  Return is a tuple of
(callable, name, description).'

def get_action(self, action):

    if callable(action):
        func = action
        action = action.__name__
    elif hasattr(self.__class__, action):
        func = getattr(self.__class__, action)
    else:
        try:
            func = self.admin_site.get_action(action)
        except KeyError:
            return None
    if hasattr(func, 'short_description'):
        description = func.short_description
    else:
        description = capfirst(action.replace('_', '    '))
    return (func, action, description)
