class_docstr: Transformation abstract class.
  
  Parameters
  ----------
  p : float or None
      Probability of executing this transform
  data_indices : tuple or None
      Indices where the transforms need to be applied
class_docstr_tok: ["Transformation","abstract","class",".","Parameters","--","--","--","--","--","p",":","float","or","None","Probability","of","executing","this","transform","data_indices",":","tuple","or","None","Indices","where","the","transforms","need","to","be","applied"]
docstr: Samples transform parameters based on data.
  
  Parameters
  ----------
  data : DataContainer
      Data container to be used for sampling.
  
  Returns
  -------
  out : tuple
      Coordinate frame (h, w).
code: def sample_transform(self, data: DataContainer):
      """
      Samples transform parameters based on data.
  
      Parameters
      ----------
      data : DataContainer
          Data container to be used for sampling.
  
      Returns
      -------
      out : tuple
          Coordinate frame (h, w).
      """
  
      self.state_dict["h"], self.state_dict["w"] = data.validate()
      return self.state_dict["h"], self.state_dict["w"]
  
imports: import copy
  import random
  from abc import ABCMeta, abstractmethod
  import cv2
  import numpy
  from solt.utils import Serializable
  from solt.constants import ALLOWED_INTERPOLATIONS, ALLOWED_PADDINGS
  from ._data import DataContainer, Keypoints
  from solt.utils import img_shape_checker, validate_parameter
label_desc: Use image node_id 4 for calling the BaseTransform obj's underlying member method code with example usage: obj.sample_transform(data) and returns: self,  self