'Loads and returns a list of RoleInclude objects from the datastructure
list of role definitions and creates the Role from those objects'

def _load_roles(self, attr, ds):

    if (ds is None):
        ds = []
    try:
        role_includes = load_list_of_roles(ds, play=self, variable_manager=self._variable_manager, loader=self._loader)
    except AssertionError as e:
        raise AnsibleParserError('A    malformed    role    declaration    was    encountered.', obj=self._ds, orig_exc=e)
    roles = []
    for ri in role_includes:
        roles.append(Role.load(ri, play=self))
    return roles
