class_docstr: base class for Collector and Item the test collection tree.
  Collector subclasses have children, Items are terminal nodes.
docstr: register a function to be called when this node is finalized.
  
  This method can only be called when this node is active
  in a setup chain, for example during self.setup().
docstr_tok: ["register","a","function","to","be","called","when","this","node","is","finalized",".","This","method","can","only","be","called","when","this","node","is","active","in","a","setup","chain",",","for","example","during","self.setup","(",")","."]
code: def addfinalizer(self, fin):
      """register a function to be called when this node is finalized.
  
      This method can only be called when this node is active
      in a setup chain, for example during self.setup().
      """
      self.session._setupstate.addfinalizer(fin, self)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import warnings
  import py
  import six
  import _pytest._code
  from _pytest.compat import getfslineno
  from _pytest.mark.structures import NodeKeywords
  from _pytest.outcomes import fail
label_desc: Use image node_id 16 for calling the Node obj's underlying member method code with example usage: obj.addfinalizer(fin) without return types