code: def findcommonblocks(block, top=1):
      ret = []
      if hascommon(block):
          for key, value in block["common"].items():
              vars_ = {v: block["vars"][v] for v in value}
              ret.append((key, value, vars_))
      elif hasbody(block):
          for b in block["body"]:
              ret = ret + findcommonblocks(b, 0)
      if top:
          tret = []
          names = []
          for t in ret:
              if t[0] not in names:
                  names.append(t[0])
                  tret.append(t)
          return tret
      return ret
  
imports: from .None import __version__
  from .auxfuncs import hasbody, hascommon, hasnote, isintent_hide, outmess, getuseblocks
  from .None import capi_maps
  from .None import func2subr
  from .crackfortran import rmbadname
label_desc: Use image node_id 1 for calling a global function with example usage: findcommonblocks(block, top) and returns: ret, tret