code: def make_augment(augment_str):
      """Generate augmentation function from separated parameter string.
      The parameter string augment_str may be either "AutoAugment" or "RandAugment".
      Undocumented use allows for specifying extra params, e.g. "RandAugment_N2_M0.5".
      """
      params = augment_str.split("_")
      names = {"N": "n_ops", "M": "magnitude", "P": "prob"}
      assert params[0] in ["RandAugment", "AutoAugment"]
      assert all(p[0] in names for p in params[1:])
      keys = [names[p[0]] for p in params[1:]]
      vals = [float(p[1:]) for p in params[1:]]
      augment = (
          rand_augment if params[0] == "RandAugment" else auto_augment
      )
      return lambda im: augment(im, **dict(zip(keys, vals)))
  
file_path: pycls/pycls/datasets/augment.py
imports: import random
  import numpy
  from PIL import Image, ImageEnhance, ImageOps
label_desc: Use image node_id 5 for calling a global function with example usage: make_augment(augment_str) and returns: function