class_docstr: This hook connects to a mail server by using the imap protocol.
  
  .. note:: Please call this Hook as context manager via `with`
      to automatically open and close the connection to the mail server.
  
  :param imap_conn_id: The :ref:`imap connection id <howto/connection:imap>`
      that contains the information used to authenticate the client.
code: def __enter__(self) -> ImapHook:
      return self.get_conn()
  
imports: from __future__ import annotations
  import email
  import imaplib
  import os
  import re
  import ssl
  from typing import TYPE_CHECKING, Any, Iterable
  from airflow.exceptions import AirflowException
  from airflow.hooks.base import BaseHook
  from airflow.utils.log.logging_mixin import LoggingMixin
label_desc: Use image node_id 2 for calling the ImapHook obj's underlying member method code with example usage: obj.__enter__() and returns: self