def METHOD_NAME(
    cls,
    workspace: "Workspace",
    scope: SerializationProcessorScope,
    import_export_config: ImportExportConfig,
) -> dict[str, Any]:
    """
    Exports the `role_assignments` in `scope` when it is being exported
    by an application type `export_serialized`.
    """
    if not import_export_config.include_permission_data:
        # We cannot yet export RBAC roles to another workspace as we would also need
        # to export all subjects to the new workspace also or somehow allow to user
        # to choose how to map subjects.
        return
    # Do not export anything if the workspace doesn't have RBAC enabled.
    if not LicenseHandler.workspace_has_feature(RBAC, workspace):
        return {}
    # Application subclass scopes can't be passed to
    # the role assignment handler. See #1624.
    if isinstance(scope, Application):
        scope = getattr(scope, "application_ptr", scope)
    serialized_role_assignments = []
    role_assignments = RoleAssignmentHandler().get_role_assignments(
        workspace, scope
    )
    for role_assignment in role_assignments:
        serialized_role_assignments.append(
            EnterpriseExportSerializedStructure.role_assignment(
                subject_id=role_assignment.subject_id,
                subject_type_id=role_assignment.subject_type_id,
                role_id=role_assignment.role.id,
            )
        )
    return {"role_assignments": serialized_role_assignments}