code: def _get_pool_size(mr):
      # if the memory resource or any of its upstreams
      # is a `PoolMemoryResource`, get its pool size
      if not isinstance(mr, rmm.mr.PoolMemoryResource):
          if hasattr(mr, "upstream_mr"):
              return _get_pool_size(mr.upstream_mr)
          else:
              return 0
      else:
          pool_size = mr.pool_size()
          return pool_size
  
label_desc: Use image node_id 1 for calling a global function with example usage: _get_pool_size(mr) and returns: pool_size, _get_pool_size, int