def METHOD_NAME(self, rt_proxy):
    self.logger.info('updating/adding {} realtime proxy'.format(rt_proxy.id))
    try:
        object_id_tag = rt_proxy.args.get('object_id_tag', rt_proxy.id)
        if 'object_id_tag' in rt_proxy.args:
            del rt_proxy.args["object_id_tag"]
        self._realtime_proxies[rt_proxy.id] = self._init_class(
            rt_proxy.id, rt_proxy.klass, object_id_tag, rt_proxy.args
        )
        self._realtime_proxies_last_update[rt_proxy.id] = rt_proxy.last_update()
    except Exception:
        self.logger.exception('impossible to update realtime proxy {}'.format(rt_proxy.id))
    # If a legacy realtime proxy exists in db, remove it from self._realtime_proxies_legacy
    realtime_proxies_from_db = list(self._realtime_proxies.values())
    realtime_proxies_legacy = self._realtime_proxies_legacy
    if realtime_proxies_legacy and realtime_proxies_from_db:
        new_realtime_proxies_legacy = dict()
        for rt_proxy_id, rt in realtime_proxies_legacy.items():
            if rt not in realtime_proxies_from_db:
                new_realtime_proxies_legacy[rt_proxy_id] = rt
        self._realtime_proxies_legacy = new_realtime_proxies_legacy