code: def mkrefs(*objs):
      """Return a list of weakrefs to each object in *objs.
      QObject instances are expanded to include all child objects.
      """
      allObjs = {}
      for obj in objs:
          obj = (
              qObjectTree(obj)
              if isinstance(obj, pg.QtCore.QObject)
              else [obj]
          )
          for o in obj:
              allObjs[id(o)] = o
      return [weakref.ref(obj) for obj in allObjs.values()]
  
file_path: pyqtgraph/tests/test_ref_cycles.py
imports: import warnings
  import weakref
  import numpy
  import pyqtgraph
label_desc: Use image node_id 3 for calling a global function with example usage: mkrefs() and returns: unknown