class_docstr: A ``TargetFormatter`` for targets that are one-hot encoded binaries.
  
  Examples
  ________
  
  .. doctest::
  
      >>> import torch
      >>> from flash.core.data.utilities.classification import SingleBinaryTargetFormatter
      >>> formatter = SingleBinaryTargetFormatter(num_classes=2)
      >>> formatter([1, 0])
      0
      >>> formatter(torch.tensor([0, 1]))
      1
class_docstr_tok: ["A","``","TargetFormatter","``","for","targets","that","are","one-hot","encoded","binaries",".","Examples","________","..","doctest",":",":",">",">",">","import","torch",">",">",">","from","flash.core.data.utilities.classification","import","SingleBinaryTargetFormatter",">",">",">","formatter","=","SingleBinaryTargetFormatter","(","num_classes=2",")",">",">",">","formatter","(","[","1",",","0","]",")","0",">",">",">","formatter","(","torch.tensor","(","[","0",",","1","]",")",")","1"]
code: def format(self, target: Any) -> Any:
      for idx, t in enumerate(target):
          if t == 1:
              return idx
      return 0
  
imports: from dataclasses import dataclass
  from functools import reduce
  from typing import Any, ClassVar, Dict, List, Optional, Tuple, Type, Union, cast
  import numpy
  import torch
  from torch import Tensor
  from flash.core.data.utilities.sort import sorted_alphanumeric
  from flash.core.utilities.imports import _TOPIC_CORE_AVAILABLE
label_desc: Use image node_id 1 for calling the SingleBinaryTargetFormatter obj's underlying member method code with example usage: obj.format(target) and returns: int, idx