def mark_as_preview(command_table, session, **kwargs):
    # These are services that are marked as preview but are
    # explicitly enabled in the config file.
    allowed_services = _get_allowed_services(session)
    for preview_service in PREVIEW_SERVICES:
        is_enabled = False
        if preview_service in allowed_services:
            # Then we don't need to swap it as a preview
            # service, the user has specifically asked to
            # enable this service.
            logger.debug("Preview service enabled through config file: %s",
                         preview_service)
            is_enabled = True
        original_command = command_table[preview_service]
        preview_cls = type(
            'PreviewCommand',
            (PreviewModeCommandMixin, original_command.__class__), {})
        command_table[preview_service] = preview_cls(
            cli_name=original_command.name,
            session=session,
            service_name=original_command.service_model.service_name,
            is_enabled=is_enabled)
        # We also want to register a handler that will update the
        # description in the docs to say that this is a preview service.
        session.get_component('event_emitter').register_last(
            'doc-description.%s' % preview_service,
            update_description_with_preview)
dataset/ETHPy150Open aws/aws-cli/awscli/customizations/preview.py/mark_as_preview/original