code: def test_custom_loss_fn_registration():
      @losses.register_loss
      def custom_loss_fn(y_true, y_pred):
          return y_pred - y_true
  
      assert custom_loss_fn.__name__ in losses.loss_dict
      assert custom_loss_fn is losses.loss_dict[custom_loss_fn.__name__]
      assert (
          losses.triplet_loss(distance=custom_loss_fn.__name__)
          is custom_loss_fn
      )
  
file_path: ivis/tests/nn/test_losses.py
imports: import tempfile
  import os
  import pytest
  from sklearn import datasets
  from tensorflow.keras import backend
  import tensorflow
  from ivis.nn import losses
  from ivis.nn.distances import euclidean_distance
  from ivis import Ivis
label_desc: Use image node_id 3 for calling a global function with example usage: test_custom_loss_fn_registration() and returns: unknown