code: def usable_local_mem_size(dev, nargs=None):
      """Return an estimate of the usable local memory size.
      :arg nargs: Number of 32-bit arguments passed.
      """
  
      usable_local_mem_size = dev.local_mem_size
  
      nv_compute_cap = nv_compute_capability(dev)
  
      if nv_compute_cap is not None and nv_compute_cap < (2, 0):
          # pre-Fermi use local mem for parameter passing
          if nargs is None:
              # assume maximum
              usable_local_mem_size -= 256
          else:
              usable_local_mem_size -= 4 * nargs
  
      return usable_local_mem_size
  
imports: import pyopencl
  from pytools import memoize
  from typing import Dict, Optional, Tuple
label_desc: Use image node_id 5 for calling a global function with example usage: usable_local_mem_size(dev, nargs) and returns: usable_local_mem_size