def METHOD_NAME(self, **kwargs):
    for key, instance in self.__instances:
        if key == kwargs:
            return instance
    instance = self._create_instance(**kwargs)
    self.__instances.append((kwargs, instance))
    return instance