code: def override_args_kwargs(
      f: Callable, args: Iterable, kwargs: dict, new_kwargs: dict
  ) -> Tuple[List, dict]:
      """Overrides positional and keyword arguments according to signature of the function using new keyword arguments.
  
      Args:
          f: callable, which signature is used to determine how to override arguments.
          args: original values of positional arguments.
          kwargs: original values of keyword arguments.
          new_kwargs: new keyword arguments, their values will override original arguments.
  
      Return:
          args: updated list of positional arguments.
          kwargs: updated dictionary of keyword arguments.
      """
      args = list(args)
      new_kwargs = new_kwargs.copy()
      p = inspect.signature(f).parameters
      for idx, (k, v) in enumerate(
          itertools.islice(p.items(), len(args))
      ):
          if v.kind not in (
              inspect.Parameter.POSITIONAL_ONLY,
              inspect.Parameter.POSITIONAL_OR_KEYWORD,
          ):
              break
          if k in new_kwargs:
              args[idx] = new_kwargs.pop(k)
      return args, {**kwargs, **new_kwargs}
  
imports: import contextlib
  import functools
  import inspect
  import itertools
  import re
  from numbers import Number
  from typing import Callable, List, Union, Tuple, Iterable, Dict, Pattern, Optional, Sequence
  import jax
  import jax.numpy
  import numpy
  from objax.constants import ConvPadding, Interpolate
  from objax.typing import ConvPaddingInt
label_desc: Use image node_id 8 for calling a global function with example usage: override_args_kwargs(f, args, kwargs, new_kwargs) and returns: args,  dict