code: def has_keyword_arg(
      func: tp.Callable[..., tp.Any], name: str
  ) -> bool:
      """Return True if func has keyword-only arguments with the given name."""
      return any(
          param.name == name
          and param.kind
          in (param.KEYWORD_ONLY, param.POSITIONAL_OR_KEYWORD)
          for param in inspect.signature(func).parameters.values()
      )
  
imports: from __future__ import annotations
  import inspect
  import typing
  import jax
  import jax.numpy
  import numpy
  import optax
  from flax.experimental.nnx.nnx import pytreelib
  from flax.experimental.nnx.nnx.module import GraphDef, Module
  from flax.experimental.nnx.nnx.proxy_caller import ApplyCaller
  from flax.experimental.nnx.nnx.rnglib import Rngs
  from flax.experimental.nnx.nnx.state import State
label_desc: Use image node_id 1 for calling a global function with example usage: has_keyword_arg(func, name) and returns: any