code: def coalesce(
      *args: typing.Any, test_value: typing.Any = None
  ) -> typing.Any:
      """Simple coalescing function that returns the first value that is not
      equal to the `test_value`. Or `None` if no value is valid. Usually this
      means that the last given value is the default value.
  
      Note that the `test_value` is compared using an identity check
      (i.e. `value is not test_value`) so changing the `test_value` won't work
      for all values.
  
      >>> coalesce(None, 1)
      1
      >>> coalesce()
  
      >>> coalesce(0, False, True)
      0
      >>> coalesce(0, False, True, test_value=0)
      False
  
      # This won't work because of the `is not test_value` type testing:
      >>> coalesce([], dict(spam='eggs'), test_value=[])
      []
      """
      return next((arg for arg in args if arg is not test_value), None)
  
imports: import abc
  import atexit
  import contextlib
  import logging
  import os
  import pathlib
  import random
  import tempfile
  import time
  import typing
  import warnings
  from .None import constants, exceptions, portalocker
label_desc: Use image node_id 1 for calling a global function with example usage: coalesce() and returns: next