def METHOD_NAME(self, examples, evaluate=False, no_cache=False):
    """
    Converts a list of examples to a TensorDataset containing InputFeatures. Caches the InputFeatures.
    Utility function for train() and eval() methods. Not intended to be used directly.
    """
    tokenizer = self.tokenizer
    args = self.args
    logging.info(" Converting to features started.")
    features = squad_convert_examples_to_features(
        examples=examples,
        tokenizer=tokenizer,
        max_seq_length=args.max_seq_length,
        doc_stride=args.doc_stride,
        max_query_length=args.max_query_length,
        is_training=not evaluate,
        tqdm_enabled=not args.silent,
        threads=args.process_count,
        args=args,
    )
    return features