
    rh                    R    d Z ddlmZ ddlZddlmZ  G d dej                        Zy)aD  Abstract IPythonEnv base class.

This module provides a layer of abstraction to address the following problems:
1. Sometimes the code needs to run in an environment where IPython is not
available, e.g. inside a unittest.
2. We want to limit dependencies on IPython to code that deals directly with
the notebook environment.
    )annotationsN)Anyc                  \    e Zd ZdZej
                  dd       Zej
                  dd       Zy)
IPythonEnvzCAbstract base class that provides a wrapper around IPython methods.c                     y)z.Wrapper around IPython.core.display.display().N selfxs     {/var/www/html/ai-insurance-compliance-backend/venv/lib/python3.12/site-packages/google/generativeai/notebook/ipython_env.pydisplayzIPythonEnv.display            c                     y)as  Wrapper to display HTML.

        This method is equivalent to calling:
          display.display(display.HTML(x))

        display() and HTML() are combined into a single method because
        display.HTML() returns an object, which would be complicated to model with
        this abstract interface.

        Args:
          x: An HTML string to be displayed.
        Nr   r	   s     r   display_htmlzIPythonEnv.display_html$   r   r   N)r   r   returnNone)r   strr   r   )__name__
__module____qualname____doc__abcabstractmethodr   r   r   r   r   r   r      s7    M= = 	 r   r   )r   
__future__r   r   typingr   ABCr   r   r   r   <module>r      s%    # 
  r   