code: def get_symbolic_weight_names(
      layer: Layer, weights: list[Tensor] = None
  ) -> list[str]:
      """Attribute names for weights
  
      Looks up the attribute names of weight tensors.
  
      :param layer: Targeted layer.
      :param weights: A list of weight tensors.
      :return: The attribute names of the weights.
      """
  
      if weights is None:
          weights = layer.weights
  
      good_guesses = [
          "kernel",
          "bias",
          "gamma",
          "beta",
          "moving_mean",
          "moving_variance",
          "depthwise_kernel",
          "pointwise_kernel",
      ]
  
      ret = []
      for weight in weights:
          for attr_name in good_guesses + dir(layer):
              if hasattr(layer, attr_name) and id(weight) == id(
                  getattr(layer, attr_name)
              ):
                  ret.append(attr_name)
                  break
      if len(weights) != len(ret):
          raise Exception("Could not find symoblic weight name(s).")
  
      return ret
  
imports: from __future__ import annotations
  import inspect
  import warnings
  from abc import ABCMeta, abstractmethod
  from typing import Any, Callable
  import numpy
  import tensorflow.keras.backend
  import tensorflow.keras.layers
  import tensorflow.keras.models
  import innvestigate.backend
  import innvestigate.backend.checks
  import innvestigate.layers
  from innvestigate.backend.types import Layer, LayerCheck, Model, NodeDict, OptionalList, ReverseTensorDict, Tensor
label_desc: Use image node_id 4 for calling a global function with example usage: get_symbolic_weight_names(layer, weights) and returns: ret