class_docstr: Base class for an augmentor
  
  ImageAugmentor should take images of type uint8 in range [0, 255], or
  floating point images in range [0, 1] or [0, 255].
  
  Attributes:
      rng: a numpy :class:`RandomState`
class_docstr_tok: ["Base","class","for","an","augmentor","ImageAugmentor","should","take","images","of","type","uint8","in","range","[","0",",","255","]",",","or","floating","point","images","in","range","[","0",",","1","]","or","[","0",",","255","]",".","Attributes",":","rng",":","a","numpy",":","class",":","`","RandomState","`"]
docstr: Instantiate a :class:`Transform` object to be used given the input image.
  Subclasses should implement this method.
  
  The :class:`ImageAugmentor` often has random policies which generate deterministic transform.
  Any of those random policies should happen inside this method and instantiate
  an actual deterministic transform to be performed.
  The returned :class:`Transform` object should perform deterministic transforms
  through its :meth:`apply_*` method.
  
  In this way, the returned :class:`Transform` object can be used to transform not only the
  input image, but other images or coordinates associated with the image.
  
  Args:
      img (ndarray): see notes of this class on the requirements.
  
  Returns:
      Transform
docstr_tok: ["Instantiate","a",":","class",":","`","Transform","`","object","to","be","used","given","the","input","image",".","Subclasses","should","implement","this","method",".","The",":","class",":","`","ImageAugmentor","`","often","has","random","policies","which","generate","deterministic","transform",".","Any","of","those","random","policies","should","happen","inside","this","method","and","instantiate","an","actual","deterministic","transform","to","be","performed",".","The","returned",":","class",":","`","Transform","`","object","should","perform","deterministic","transforms","through","its",":","meth",":","`","apply_","*","`","method",".","In","this","way",",","the","returned",":","class",":","`","Transform","`","object","can","be","used","to","transform","not","only","the","input","image",",","but","other","images","or","coordinates","associated","with","the","image",".","Args",":","img","(","ndarray",")",":","see","notes","of","this","class","on","the","requirements",".","Returns",":","Transform"]
code: def get_transform(self, img):
      """
      Instantiate a :class:`Transform` object to be used given the input image.
      Subclasses should implement this method.
  
      The :class:`ImageAugmentor` often has random policies which generate deterministic transform.
      Any of those random policies should happen inside this method and instantiate
      an actual deterministic transform to be performed.
      The returned :class:`Transform` object should perform deterministic transforms
      through its :meth:`apply_*` method.
  
      In this way, the returned :class:`Transform` object can be used to transform not only the
      input image, but other images or coordinates associated with the image.
  
      Args:
          img (ndarray): see notes of this class on the requirements.
  
      Returns:
          Transform
      """
      # This should be an abstract method
      # But we provide an implementation that uses the old interface,
      # for backward compatibility
      log_once(
          "The old augmentor interface was deprecated. "
          "Please implement {} with `get_transform` instead!".format(
              self.__class__.__name__
          ),
          "warning",
      )
  
      def legacy_augment_coords(self, coords, p):
          try:
              return self._augment_coords(coords, p)
          except AttributeError:
              pass
          try:
              return self.augment_coords(coords, p)
          except AttributeError:
              pass
          return coords  # this is the old default
  
      p = None  # the default return value for this method
      try:
          p = self._get_augment_params(img)
      except AttributeError:
          pass
      try:
          p = self.get_augment_params(img)
      except AttributeError:
          pass
  
      from .transform import BaseTransform, TransformFactory
  
      if isinstance(
          p, BaseTransform
      ):  # some old augs return Transform already
          return p
  
      return TransformFactory(
          name="LegacyConversion -- " + str(self),
          apply_image=lambda img: self._augment(img, p),
          apply_coords=lambda coords: legacy_augment_coords(
              self, coords, p
          ),
      )
  
imports: import os
  import inspect
  import pprint
  from collections import namedtuple
  import weakref
  from ...utils.argtools import log_once
  from ...utils.utils import get_rng
  from ...utils.develop import deprecated
  from ..image import check_dtype
label_desc: Use image node_id 6 for calling the ImageAugmentor obj's underlying member method code with example usage: obj.get_transform(img) and returns: TransformFactory, coords, p, self, self