00000042
      ˆÂ‘äÇò 8à$rG¤•É�ùÁƒh¹À¿¾      1
  /   ˆ{‹„„-i[D<†ªoZƒ›Ù«Â564_‘I|¥‰ÓMdœv ©ƒ†ü+=ÂÁ 4    ‹      Õ–]oÚ0†ïû+<_ìm'Ñ�©#HC£€(Ó4M2±!‰Ù'dì×Ï!™ h«¦MÊUŽO^¿9�í$Ç{L‹Ï³!y¿x“ÙÇwãÑ€ÐÀ§î  Xå�ëf«0œPB#Ä´�çy3ï6µÙÀb&ñ5X42Ä&GNý+¯ÈùWÄ‹ãîJ<”¤¸øFôš€ÎÐJ.Ü¼½.v°Šu¸…7½.Ølå’(ˆµNÛ�ê\Jç	•©·Ò|_<«ýW¾nú¡@¶:Ø¡ñ=ŒÈŽÅr£úuJ}O&bMØ§ C­¬óejÛÜÈ5%,Æ>ý2L¿:`TÌö=F"#Ö}úvÐŸÜMûõ',°óš§¹§þ˜Y$‰ær-¿(~,Å�òûeÃ ÔÂ†F¦(µ:JÁ!ž¢†:¶)s¬7Ž 2§ªRÂ·,|²³ûùp²FórIxaq¬î%»Dý3B!	¤!j³¯0JÏ×jeÓ»ŸCRiä&BêÒ g•/ ËÔVé\�Â¹…;‹Åì^…Ô?\N‹|VU§Õ¹m´Û�N‡´n{ÝB.Ý‹÷á–Ÿ¡¶™M…âK.b¶_&ÖÑœÉÖÎéÑè˜úUPC“)”‰X²åN,·’»í9“¬?Zÿ‚VÄ5FªøÁð#V•¨1’E†ÙÉ,Çu*¿s‚?;�Oó5Ì,Ûœp†ÿç¨Z0��eùoÑ­º§
    G   ˆl–Ým_J¥/”Š�rà¸Ø”Å£’þ[pk6Y@(Ýz@ Zof¯ùÅÁÀÄ532_‹I|¥Žƒî4ÃVŸÄÃ     ‹      Õ”KOQF÷ýG³F	oª.ò9/ ’ v! ���$Tü÷ú¦W­ZµH­ÚE¥‘æZöýlŸñx8êÍéût1MfÓ�ŸrûáI2É~¢d-Éúû�<ŠäØVòº¦è6Ž¨P¢J�z=¦A“'œrF›s.¸¤Ã)×ÜpKŸ;î0ä�céRvUsÕ °N†,l²Å6;ì²ÇŽxLøVŠø.?SfÌyâ™K^È	yŒÈ‹‚(Š’(»Š8G¢"ª¢&êâX4DS´Ä‰8gb"Úb*ÎÅ…¸q%º¢'Rq-nüÌ­è‹;q/bèz+3ý>	æâIìŠ½À:ÿ•ÿŽÇŸÂÈ2‡Qˆ0~Õ¸ÏÞŸQ0ŠFÉXˆ1KïÕ80^ÄºÈˆ¬‹ïÞ¯õâ¨‹«,ÿmû¯YÅ¨5£nÁ¦‡›ƒð>K±ÏB€Õ0¶¼£eœ§Æ™Ñ6Î�ãÒèWF×è©qmÜ·Fß¸û	M×/Gýû õ «ß·ÌÀz=^É*ïØxQ‡1*OÎ­£h}ù´½XþªöJt……Q�ç®Ÿk?l¬ S�þIÈpüut¦ÆÌ˜O>-«	YKoÅX72úÈÆf¸Øˆ—!}3[ÁÓŠÆ¶a)îø
Kšét4ŸtSÊý‡ÙtŸJçe9uzÉë‡wŸ ê¡Øj    B   	ˆl–Ü4ý( ©”u( 	•íÀà™S�ÿ�þYÎ,Ü¢#á�a	HçÇ„Ÿe¯Æ_ŠI|¥�+Wé3ž¯ÆÅ 2†    	# Copyright (C) 2006-2010 Canonical Ltd
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

"""Classes to provide name-to-object registry-like support."""

from typing import (
    TypeVar,
    Generic,
    Optional,
    Any,
    cast,
    Union,
    Callable,
    Dict,
    List,
    Iterator,
    Tuple,
    Callable,
)

from .pyutils import get_named_object


T = TypeVar('T')


class _ObjectGetter(Generic[T]):
    """Maintain a reference to an object, and return the object on request.

    This is used by Registry to make plain objects function similarly
    to lazily imported objects.

    Objects can be any sort of python object (class, function, module,
    instance, etc)
    """

    __slots__ = ['_obj']

    _obj: T

    def __init__(self, obj):
        self._obj = obj

    def get_module(self) -> str:
        """Get the module the object was loaded from."""
        return self._obj.__module__

    def get_obj(self) -> T:
        """Get the object that was saved at creation time"""
        return self._obj


class _LazyObjectGetter(_ObjectGetter[T]):
    """Keep a record of a possible object.

    When requested, load and return it.
    """

    __slots__ = ['_module_name', '_member_name', '_imported']

    def __init__(self, module_name, member_name):
        self._module_name = module_name
        self._member_name = member_name
        self._imported = False
        super().__init__(None)

    def get_module(self):
        """Get the module the referenced object will be loaded from.
        """
        return self._module_name

    def get_obj(self) -> T:
        """Get the referenced object.

        Upon first request, the object will be imported. Future requests will
        return the imported object.
        """
        if not self._imported:
            self._obj = get_named_object(self._module_name, self._member_name)
            self._imported = True
        return super().get_obj()

    def __repr__(self):
        return "<{}.{} object at {:x}, module={!r} attribute={!r} imported={!r}>".format(