def get_resource_and_action(action, pluralized=None):
    """Extract resource and action (write, read) from api operation."""
    data = action.split(':', 1)[0].split('_', 1)
    resource = pluralized or ("%ss" % data[-1])
    return (resource, data[0] != 'get')