class_docstr: Singleton metaclass for :class:`fiftyone.core.sample.Sample`.
  
  This metaclass maintains a weakref dictionary of all in-memory
  :class:`fiftyone.core.sample.Sample` instances keyed by
  ``[collection name][sample ID]``.
code: def _register_instance(cls, obj):
      cls._instances[obj._doc.collection_name][obj.id] = obj
  
imports: from collections import defaultdict
  import weakref
label_desc: Use image node_id 2 for calling the SampleSingleton obj's underlying member method code with example usage: obj._register_instance(cls, obj) without return types