code: def _is_parent(self, roleid1, roleid2):
          
  
          role2 = copy.deepcopy(self.flatten[roleid2])
          role1 = copy.deepcopy(self.flatten[roleid1])
  
          if role1 == role2:
              return False
  
          # Check if role1 is contained by role2
          for b1 in role1['backends_groups']:
              if b1 not in role2['backends_groups']:
                  return False
              for group in role1['backends_groups'][b1]:
                  if group not in role2['backends_groups'][b1]:
                      return False
  
          # If role2 is inside role1, roles are equal, throw exception
          for b2 in role2['backends_groups']:
              if b2 not in role1['backends_groups']:
                  return True
              for group in role2['backends_groups'][b2]:
                  if group not in role1['backends_groups'][b2]:
                      return True
          raise DumplicateRoleContent(roleid1, roleid2)
docs: Test if roleid1 is contained inside roleid2