code: def get_kernel(layer: Layer) -> np.ndarray:
      """Returns the kernel weights of a layer, i.e, w/o biases."""
      ret = [x for x in layer.get_weights() if len(x.shape) > 1]
      assert len(ret) == 1
      return ret[0]
  
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 1 for calling a global function with example usage: get_kernel(layer) and returns: ret