def METHOD_NAME(self, input_text):
    """
    Encodes a single input text using the tokenizer.
    Args:
        input_text (str): The input text to be encoded.
    Returns:
        tuple: A tuple with two tensors: the encoded input ids and the attention mask.
    """
    if isinstance(input_text, (bytes, bytearray)):
        input_text = input_text.decode("utf-8")
    logger.info("Received text: '%s'", input_text)
    inputs = self.tokenizer.encode_plus(
        input_text,
        max_length=self.max_length,
        pad_to_max_length=True,
        add_special_tokens=True,
        return_tensors="pt",
    )
    input_ids = inputs["input_ids"]
    return input_ids