code: def _cond_convert_labels(y_true):
      are_zeros = ivy.equal(y_true, 0.0)
      are_ones = ivy.equal(y_true, 1.0)
      is_binary = ivy.all(ivy.logical_or(are_zeros, are_ones))
      # convert [0, 1] labels to [-1, 1]
      if is_binary:
          return 2.0 * y_true - 1
      return y_true
  
imports: import ivy
  from ivy.functional.frontends.tensorflow.func_wrapper import to_ivy_arrays_and_back
label_desc: Use image node_id 2 for calling a global function with example usage: _cond_convert_labels(y_true) and returns: y_true, unknown