def METHOD_NAME(self, model_input, attention_mask, tokentype_ids=None):
    extended_attention_mask = bert_extended_attention_mask(attention_mask)
    input_ids = model_input
    position_ids = bert_position_ids(input_ids)
    lm_output = self.language_model(
        input_ids,
        position_ids,
        extended_attention_mask,
        tokentype_ids=tokentype_ids
    )
    if self.post_process:
        _, pooled_output = lm_output
        classification_output = self.classification_dropout(pooled_output)
        classification_logits = self.classification_head(classification_output)
        # Reshape back to separate choices.
        classification_logits = classification_logits.view(-1, self.num_classes)
        return classification_logits
    return lm_output