class_docstr: Flip an image horizontally with a certain probability.
  
  Args:
      prob (float, optional): A probability of horizontally flipping. Default: 0.5.
class_docstr_tok: ["Flip","an","image","horizontally","with","a","certain","probability",".","Args",":","prob","(","float",",","optional",")",":","A","probability","of","horizontally","flipping",".","Default",":","0.5","."]
code: def __call__(self, data):
      if random.random() < self.prob:
          data["img"] = functional.horizontal_flip(data["img"])
          for key in data.get("gt_fields", []):
              data[key] = functional.horizontal_flip(data[key])
  
      return data
  
imports: import os
  import random
  import string
  import cv2
  import numpy
  from paddleseg.transforms import functional
  from paddleseg.cvlibs import manager
  from paddleseg.utils import seg_env
  from PIL import Image
label_desc: Use image node_id 2 for calling the RandomHorizontalFlip obj's underlying member method code with example usage: obj.__call__(data) and returns: data