


"""simple docstring"""







from dataclasses import dataclass
from typing import List, Optional, Union

import numpy as np
import PIL

from ...utils import BaseOutput, is_invisible_watermark_available, is_torch_available, is_transformers_available






@dataclass
class 		_A    (    lowercase_    ):







    """simple docstring"""




    UpperCAmelCase			:				str      =			4_2


if is_transformers_available() and is_torch_available() and is_invisible_watermark_available():
 from .pipeline_stable_diffusion_xl import StableDiffusionXLPipeline
 from .pipeline_stable_diffusion_xl_imgaimg import StableDiffusionXLImgaImgPipeline








class 		__magic_name__				:


  """simple docstring"""





  class 		__magic_name__				:


    """simple docstring"""





    _UpperCamelCase						 = "_prev", "_data", "_next"


    def __init__(					self	,		a__	,		a__	,		a__		):
      _lowerCamelCase      =						link_p
      _lowerCamelCase      =						element
      _lowerCamelCase      =						link_n


    def     _UpperCAmelCase  (					self		):
      return (
          f''' Prev -> {self._prev is not None}, Next -> {self._next is not None}'''
      )







  def __init__(					self		):
    _lowerCamelCase      =						self._Node(a__	,		a__	,		a__		)
    _lowerCamelCase      =						self._Node(a__	,		a__	,		a__		)
    _lowerCamelCase      =						self._trailer
    _lowerCamelCase      =						self._header
    _lowerCamelCase      =						0


  def __len__(					self		):
    return self._size


  def     _UpperCAmelCase  (					self		):
    return self.__len__() == 0


  def     _UpperCAmelCase  (					self	,		a__	,		a__	,		a__		):
    # Create new_node by setting it's prev.link -> header
    # setting it's next.link -> trailer
    _lowerCamelCase      =						self._Node(a__	,		a__	,		a__		)
    _lowerCamelCase      =						new_node
    _lowerCamelCase      =						new_node
    self._size += 1
    return self


  def     _UpperCAmelCase  (					self	,		a__		):
    _lowerCamelCase      =						node._prev
    _lowerCamelCase      =						node._next

    _lowerCamelCase      =						successor
    _lowerCamelCase      =						predecessor
    self._size -= 1
    _lowerCamelCase      =						node._data
    _lowerCamelCase      =						_lowerCamelCase      =						_lowerCamelCase      =						None
    del node
    return temp







class 		__magic_name__				( _DoublyLinkedBase					):


  """simple docstring"""





  def     _UpperCAmelCase  (					self		):
    if self.is_empty():
      raise Exception('''List is empty'''		)
    return self._header._next._data


  def     _UpperCAmelCase  (					self		):
    if self.is_empty():
      raise Exception('''List is empty'''		)
    return self._trailer._prev._data


  def     _UpperCAmelCase  (					self	,		a__		):
    return self._insert(self._header	,		a__	,		self._header._next		)


  def     _UpperCAmelCase  (					self	,		a__		):
    return self._insert(self._trailer._prev	,		a__	,		self._trailer		)


  def     _UpperCAmelCase  (					self		):
    if self.is_empty():
      raise IndexError('''remove_first from empty list'''		)
    return self._delete(self._header._next		)


  def     _UpperCAmelCase  (					self		):
    if self.is_empty():
      raise IndexError('''remove_first from empty list'''		)
    return self._delete(self._trailer._prev		)




