code: def is_padfn(
      padding: Union[hk.pad.PadFn, Sequence[hk.pad.PadFn], Any]
  ) -> bool:
      """Tests whether the given argument is a single or sequence of PadFns."""
      if isinstance(padding, abc.Sequence):
          padding = padding[0]
      return callable(padding)
  
file_path: dm-haiku/haiku/_src/pad.py
imports: from collections import abc
  from collections.abc import Sequence
  import typing
  from typing import Any, Callable, Union
  from haiku._src import utils
label_desc: Use image node_id 8 for calling a global function with example usage: is_padfn(padding) and returns: callable