def add_waiters(command_table, session, command_object, **kwargs):
    # Check if the command object passed in has a ``service_object``. We
    # only want to add wait commands to top level model-driven services.
    # These require service objects.
    service_model = getattr(command_object, 'service_model', None)
    if service_model is not None:
        # Get a client out of the service object.
        waiter_model = get_waiter_model_from_service_model(session,
                                                           service_model)
        if waiter_model is None:
            return
        waiter_names = waiter_model.waiter_names
        # If there are waiters make a wait command.
        if waiter_names:
            command_table['wait'] = WaitCommand(
                session, waiter_model, service_model)
dataset/ETHPy150Open aws/aws-cli/awscli/customizations/waiters.py/add_waiters/original