code: def weighted_cross_entropy_with_logits(
      labels=None, logits=None, pos_weight=1.0, name=None
  ):
      ivy.utils.assertions.check_shape(labels, logits)
      ones = ivy.ones_like(labels)
      zeros = ivy.zeros_like(logits)
      log_weight = ivy.add(ones, ivy.multiply(pos_weight - 1, labels))
      ones_minus_labels = ivy.subtract(ones, labels)
      first_term = ivy.multiply(ones_minus_labels, logits)
  
      max_neg_logits = ivy.where(
          ivy.negative(logits) >= zeros, ivy.negative(logits), zeros
      )
      neg_abs_logits = ivy.negative(ivy.abs(logits))
      log_neg_abs_logits = ivy.log1p(ivy.exp(neg_abs_logits))
      second_term = ivy.multiply(
          log_weight, ivy.add(log_neg_abs_logits, max_neg_logits)
      )
      return ivy.add(first_term, second_term)
  
imports: import ivy
  from ivy.functional.frontends.tensorflow.func_wrapper import to_ivy_arrays_and_back
  from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
  from ivy.functional.frontends.tensorflow import check_tensorflow_casting
label_desc: Use image node_id 42 for calling a global function with example usage: weighted_cross_entropy_with_logits(labels, logits, pos_weight, name) and returns: ivy