class_docstr: Randomly convert image or videos to grayscale with a probability of p (default 0.1).
  
  If the input is a :class:`torch.Tensor`, it is expected to have [..., 3 or 1, H, W] shape,
  where ... means an arbitrary number of leading dimensions
  
  The output has the same number of channels as the input.
  
  Args:
      p (float): probability that image should be converted to grayscale.
class_docstr_tok: ["Randomly","convert","image","or","videos","to","grayscale","with","a","probability","of","p","(","default","0.1",")",".","If","the","input","is","a",":","class",":","`","torch.Tensor","`",",","it","is","expected","to","have","[","...",",","3","or","1",",","H",",","W","]","shape",",","where","...","means","an","arbitrary","number","of","leading","dimensions","The","output","has","the","same","number","of","channels","as","the","input",".","Args",":","p","(","float",")",":","probability","that","image","should","be","converted","to","grayscale","."]
code: def _transform(self, inpt: Any, params: Dict[str, Any]) -> Any:
      return self._call_kernel(
          F.rgb_to_grayscale,
          inpt,
          num_output_channels=params["num_input_channels"],
      )
  
imports: import collections.abc
  from typing import Any, Dict, List, Optional, Sequence, Tuple, Union
  import torch
  from torchvision import transforms
  from torchvision.transforms.v2 import functional, Transform
  from ._transform import _RandomApplyTransform
  from ._utils import query_chw
label_desc: Use image node_id 3 for calling the RandomGrayscale obj's underlying member method code with example usage: obj._transform(inpt, params) and returns: self