class_docstr: Wrapper class for transformations to config dicts.
class_docstr_tok: ["Wrapper","class","for","transformations","to","config","dicts","."]
docstr: Constructor.
  
  Args:
      transform: A function or other callable from Dict -> Dict which returns a modified version of the config.
                 The callable may update the config in-place and return it, or return a new dict.
      version: The Ludwig version, should be the first version which requires this transform.
      prefixes: A list of config prefixes this transform should apply to, i.e. ["hyperopt"].  If not specified,
                transform will be called with the entire config dictionary.
docstr_tok: ["Constructor",".","Args",":","transform",":","A","function","or","other","callable","from","Dict","-",">","Dict","which","returns","a","modified","version","of","the","config",".","The","callable","may","update","the","config","in-place","and","return","it",",","or","return","a","new","dict",".","version",":","The","Ludwig","version",",","should","be","the","first","version","which","requires","this","transform",".","prefixes",":","A","list","of","config","prefixes","this","transform","should","apply","to",",","i.e",".","[","``","hyperopt","''","]",".","If","not","specified",",","transform","will","be","called","with","the","entire","config","dictionary","."]
code: def __init__(
      self,
      transform: Callable[[Dict], Dict],
      version: str,
      prefixes: List[str] = None,
  ):
      """Constructor.
  
      Args:
          transform: A function or other callable from Dict -> Dict which returns a modified version of the config.
                     The callable may update the config in-place and return it, or return a new dict.
          version: The Ludwig version, should be the first version which requires this transform.
          prefixes: A list of config prefixes this transform should apply to, i.e. ["hyperopt"].  If not specified,
                    transform will be called with the entire config dictionary.
      """
      self.transform = transform
      self.version = version
      self.pkg_version = pkg_version.parse(version)
      self.prefixes = prefixes if prefixes else []
  
file_path: ludwig/ludwig/utils/version_transformation.py
imports: import copy
  import logging
  from collections import defaultdict
  from functools import total_ordering
  from typing import Callable, Dict, List, Optional
  from packaging import version
label_desc: Use image node_id 1 to create a new VersionTransformation object  with example: obj = VersionTransformation(transform, version, prefixes)