@classmethod
def get_instance(cls, obj):
    """Return the instance if it already exists, else returns None."""
    try:
        return cls._instances[obj]
    except (AttributeError, KeyError):
        pass
