@classmethod
def from_str(cls, s):
    """Creates scope from string.
        """
    if s == 'grp':
        return cls.GROUP
    if s == 'ent':
        return cls.ENTITY
    if s == 'attr':
        return cls.ATTRIBUTE
    raise Exception('Unknown scope')
