class_docstr: Apply transformations per-channel
  
  Args:
      transforms (list): list of transformations to compose.
      channels (sequence): channels to apply the transform to. Pass None to apply to all.
                       Default: None (apply to all)
      p (float): probability of applying the transform. Default: 0.5.
class_docstr_tok: ["Apply","transformations","per-channel","Args",":","transforms","(","list",")",":","list","of","transformations","to","compose",".","channels","(","sequence",")",":","channels","to","apply","the","transform","to",".","Pass","None","to","apply","to","all",".","Default",":","None","(","apply","to","all",")","p","(","float",")",":","probability","of","applying","the","transform",".","Default",":","0.5","."]
code: def __call__(
      self, *args, force_apply: bool = False, **data
  ) -> typing.Dict[str, typing.Any]:
      if force_apply or random.random() < self.p:
          image = data["image"]
  
          # Expand mono images to have a single channel
          if len(image.shape) == 2:
              image = np.expand_dims(image, -1)
  
          if self.channels is None:
              self.channels = range(image.shape[2])
  
          for c in self.channels:
              for t in self.transforms:
                  image[:, :, c] = t(image=image[:, :, c])["image"]
  
          data["image"] = image
  
      return data
  
imports: from __future__ import division
  import random
  import typing
  import warnings
  from collections import defaultdict
  import numpy
  from ..None import random_utils
  from .bbox_utils import BboxParams, BboxProcessor
  from .keypoints_utils import KeypointParams, KeypointsProcessor
  from .serialization import SERIALIZABLE_REGISTRY, Serializable, get_shortest_class_fullname, instantiate_nonserializable
  from .transforms_interface import BasicTransform
  from .utils import format_args, get_shape
label_desc: Use image node_id 2 for calling the PerChannel obj's underlying member method code with example usage: obj.__call__() and returns: data