code: def multilabel_soft_margin_loss(
      input,
      target,
      weight=None,
      size_average=None,
      reduce=None,
      reduction="mean",
  ):
      loss = -(
          target * ivy.log(ivy.sigmoid(input))
          + (1 - target) * ivy.log(1 - ivy.sigmoid(input))
      )
  
      if weight is not None:
          loss = ivy.multiply(weight, loss)
  
      class_dim = ivy.get_num_dims(input) - 1
      C = ivy.shape(input)[class_dim]
  
      loss = ivy.sum(loss, axis=class_dim) / C
  
      reduction = _get_reduction(reduction, size_average, reduce)
      ret = reduction(loss)
  
      return ret
  
imports: import ivy
  import ivy.functional.frontends.torch
  from ivy.functional.frontends.torch.func_wrapper import to_ivy_arrays_and_back
  from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
label_desc: Use image node_id 19 for calling a global function with example usage: multilabel_soft_margin_loss(input, target, weight, size_average, reduce, reduction) and returns: ret