code: def weight_memory_size(weights):
      """Compute the memory footprint for weights based on their dtypes.
  
      Args:
          weights: An iterable contains the weights to compute weight size.
  
      Returns:
          The total memory size (in Bytes) of the weights.
      """
      unique_weights = {id(w): w for w in weights}.values()
      total_memory_size = 0
      for w in unique_weights:
          weight_shape = math.prod(w.shape)
          dtype = backend.standardize_dtype(w.dtype)
          per_param_size = dtype_utils.dtype_size(dtype)
          total_memory_size += weight_shape * per_param_size
      return total_memory_size / 8
  
file_path: keras/keras/utils/summary_utils.py
imports: import math
  import re
  import shutil
  import rich
  import rich.console
  import rich.markup
  import rich.table
  import tree
  from keras import backend
  from keras.utils import dtype_utils
  from keras.utils import io_utils
label_desc: Use image node_id 2 for calling a global function with example usage: weight_memory_size(weights) and returns: unknown