@staticmethod
def _parse_id(role, resource):
    """Given role <res>-<id>-<level>
        Returns id if resource matches, otherwise None
        """
    x = role.split('-')
    if x and x[0] == resource:
        return '-'.join(x[1:-1])
