code: def _wrap_call_and_conditional_losses(layer):
      """Wraps call function that returns a tuple of (outputs, losses).
  
      The losses returned are conditional on the inputs passed to the call function.
      Unconditional losses (e.g. weight regularizeration) are wrapped separately.
  
      Args:
        layer: a Keras layer object
  
      Returns:
        python call function that returns outputs and conditional losses -- excludes
        activity regularizer
      """
      # Create function that generates both outputs and losses
      layer_call = _get_layer_call_method(layer)
  
      def call_and_return_conditional_losses(*args, **kwargs):
          """Returns layer (call_output, conditional losses) tuple."""
          call_output = layer_call(*args, **kwargs)
          if version_utils.is_v1_layer_or_model(layer):
              conditional_losses = layer.get_losses_for(
                  _filtered_inputs([args, kwargs])
              )
          else:
              conditional_losses = [
                  l
                  for l in layer.losses
                  if not hasattr(l, "_unconditional_loss")
              ]
          return call_output, conditional_losses
  
      return _create_call_fn_decorator(
          layer, call_and_return_conditional_losses
      )
  
imports: import functools
  import threading
  import weakref
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import tensor_spec
  from tensorflow.python.keras import backend
  from tensorflow.python.keras.engine import base_layer_utils
  from tensorflow.python.keras.engine import input_spec
  from tensorflow.python.keras.mixed_precision import autocast_variable
  from tensorflow.python.keras.saving import saving_utils
  from tensorflow.python.keras.saving.saved_model import constants
  from tensorflow.python.keras.saving.saved_model import load
  from tensorflow.python.keras.saving.saved_model import serialized_attributes
  from tensorflow.python.keras.saving.saved_model import utils
  from tensorflow.python.keras.utils import tf_contextlib
  from tensorflow.python.keras.utils import tf_inspect
  from tensorflow.python.keras.utils import tf_utils
  from tensorflow.python.keras.utils import version_utils
  from tensorflow.python.keras.utils.generic_utils import LazyLoader
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.trackable import data_structures
  from tensorflow.python.util import nest
  from tensorflow.python.util import tf_decorator
label_desc: Use image node_id 14 for calling a global function with example usage: _wrap_call_and_conditional_losses(layer) and returns: _create_call_fn_decorator, call_output,  conditional_losses