def gen_msg(message_id, *args):
    """
    Provides pre-generated text messages.

    Args:
        message_id (str):
        args (str): Arguments which are merged into message using
            the string formatting operator.

    Returns:
        str: message
    """
    # Get message
    message = dict(
        not_found_named="'%s' not found: %s",
        no_find="Unable to find %s",
        no_find_named="Unable to find %s '%s'",
        no_host_found='No host found and no local accelerator available. '
                      'Please check your configuration.',
        no_instance_ip="Unable to find instance IP",
        no_instance_id="Unable to find instance '%s'",
        no_instance="Unable to find instance",
        no_credentials="Accelize client ID and secret ID are mandatory.",
        created_named="Created %s '%s'",
        created_failed="Unable to create %s",
        created_failed_named="Unable to create %s '%s'",
        accelize_generated="Generated by Apyfal",
        attached_to="Attached %s '%s' to %s '%s'",
        authorized_ip="Authorized '%s' in security group '%s'",
        timeout="Timed out while waiting instance %s",
        timeout_status="Timed out while waiting instance %s, last status: %s",
        unable_to="Unable to %s instance",
        unable_to_named="Unable to %s %s",
        unable_to_status="Unable to %s instance, last status: %s",
        unable_find_from="Unable to find %s '%s', please contact %s.",
        unable_reach_url="Unable to reach URL '%s'",
        unable_reach_port="Unable to reach host '%s' on port %s"
    )[message_id]

    # Merge arguments
    if args:
        message %= args

    return message