'Initialization of base permissions
based on exposed methods and actions
Initialization of extra args'

def __init__(self):

    if (self.base_permissions is None):
        self.base_permissions = set()
        for attr_name in dir(self):
            if hasattr(getattr(self, attr_name), '_permission_name'):
                permission_name = getattr(getattr(self, attr_name), '_permission_name')
                self.base_permissions.add(('can_' + permission_name))
        self.base_permissions = list(self.base_permissions)
    if (not self.extra_args):
        self.extra_args = dict()
    self._apis = dict()
    for attr_name in dir(self):
        if hasattr(getattr(self, attr_name), '_extra'):
            _extra = getattr(getattr(self, attr_name), '_extra')
            for key in _extra:
                self._apis[key] = _extra[key]
