code: def masked_crossentropy(
      targets: tf.Tensor, logits: tf.Tensor
  ) -> tf.Tensor:
      crossentropy = tf.keras.losses.SparseCategoricalCrossentropy(
          from_logits=True
      )
      mask = tf.math.logical_not(tf.math.equal(targets, 0))
      mask = tf.cast(mask, dtype=tf.int64)
      loss = crossentropy(targets, logits, sample_weight=mask)
      return loss
  
label_desc: Use image node_id 1 for calling a global function with example usage: masked_crossentropy(targets, logits) and returns: loss