code: public function getRoleIdsForRoles(array $roles): array 
      {
          if (count($roles) == 0) {
              throw new \InvalidArgumentException("Roles array must be populated.");
          }
      
          $roleIds = [];
  
          foreach ($roles as $role) {
              if (null === $roleIds[] = $this->getRoleIdForRole($role)) {
                  throw new \InvalidArgumentException("Role $role does not exist");
              }
          }
      
          return $roleIds;
      }
docs: all roles must exist or exception thrown