def note_referenced_by(self, name=None, id=None):
        self.referenced = 1
        # Element.expect_referenced_by_* dictionaries map names or ids
        # to nodes whose ``referenced`` attribute is set to true as
        # soon as this node is referenced by the given name or id.
        # Needed for target propagation.
        by_name = getattr(self, 'expect_referenced_by_name', {}).get(name)
        by_id = getattr(self, 'expect_referenced_by_id', {}).get(id)
        if by_name:
            assert name is not None
            by_name.referenced = 1
        if by_id:
            assert id is not None
            by_id.referenced = 1
Update stats tracking for metric and emit log message.
dataset/ETHPy150Open adieu/allbuttonspressed/docutils/nodes.py/Element.note_referenced_by--crossover with--dataset/ETHPy150Open openstack/swift/swift/container/reconciler.py/ContainerReconciler.stats_log