def METHOD_NAME(input_event, relation, text_encoder, max_e1, max_r, force):
    abort = False
    e1_tokens, rel_tokens, _ = data.conceptnet_data.do_example(text_encoder, input_event, relation, None)
    if len(e1_tokens) > max_e1:
        if force:
            XMB = torch.zeros(1, len(e1_tokens) + max_r).long().to(settings.device)
        else:
            XMB = torch.zeros(1, max_e1 + max_r).long().to(settings.device)
            return {}, True
    else:
        XMB = torch.zeros(1, max_e1 + max_r).long().to(settings.device)
    XMB[:, : len(e1_tokens)] = torch.LongTensor(e1_tokens)
    XMB[:, max_e1 : max_e1 + len(rel_tokens)] = torch.LongTensor(rel_tokens)
    batch = {}
    batch["sequences"] = XMB
    batch["attention_mask"] = data.conceptnet_data.make_attention_mask(XMB)
    return batch, abort