class_docstr: Randomly adjust image contrast. Operates on raw arrays (not tensors).
  
  Parameters
  ----------
  magnitude : float
      randomly choose contrast enhancement factor on [max(0, 1-magnitude), 1+magnitude]
  p : float
      probability to apply contrast
class_docstr_tok: ["Randomly","adjust","image","contrast",".","Operates","on","raw","arrays","(","not","tensors",")",".","Parameters","--","--","--","--","--","magnitude",":","float","randomly","choose","contrast","enhancement","factor","on","[","max","(","0",",","1-magnitude",")",",","1+magnitude","]","p",":","float","probability","to","apply","contrast"]
code: def __init__(self, magnitude, p=0.5):
      super().__init__()
      self.p = p
      self.magnitude = magnitude
  
imports: import numpy
  from dataclasses import replace
  from ..pipeline.allocation_query import AllocationQuery
  from ..pipeline.operation import Operation
  from ..pipeline.state import State
  from ..pipeline.compiler import Compiler
label_desc: Use image node_id 1 to create a new RandomContrast object from inherited base classes: Operation with example: obj = RandomContrast(magnitude, p)